-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Adnan-S-Husain/zustand-store-implementation
zustand store implementation
- Loading branch information
Showing
16 changed files
with
256 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { FollowerInitialiserComponent } from './follower_init.js'; | ||
|
||
export function Follower() { | ||
return <FollowerInitialiserComponent />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './update_follower.js'; | ||
export * from './follower.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { useContext } from 'react'; | ||
import { MousePropertiesContext } from '../context/mouse.context.js'; | ||
import useMouseStore from '../store/index.js'; | ||
|
||
export function useControlOptions() { | ||
const { addLayer, removeLayer, clearStack, logStack, peekStack } = useContext(MousePropertiesContext); | ||
const store = useMouseStore((state) => ({ | ||
addOptionLayer: state.pushLayer, | ||
removePreviousLayer: state.popLayer, | ||
clearLayers: state.clearLayers, | ||
})); | ||
|
||
return { | ||
addOptionLayer: addLayer, | ||
removePreviousLayer: removeLayer, | ||
clearLayers: clearStack, | ||
logLayers: logStack, | ||
topLayer: peekStack, | ||
// logLayers: logStack, | ||
...store, | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './component/index.js'; | ||
export * from './context/index.js'; | ||
export * from './hook/index.js'; |
Oops, something went wrong.