refactor: move more files to typescript
This commit is contained in:
20 files changed
+123
-177
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { shallow } from "zustand/shallow";
|
||||
import { createWithEqualityFn } from "zustand/traditional";
|
||||
|
||||
type DrawerStore = {
|
||||
open: boolean;
|
||||
setOpen: (sopen: boolean) => void;
|
||||
};
|
||||
|
||||
export const useDrawerStore = createWithEqualityFn<DrawerStore>(
|
||||
(set) => ({
|
||||
open: false,
|
||||
setOpen: (sopen) => {
|
||||
set(() => ({ open: sopen }));
|
||||
},
|
||||
}),
|
||||
shallow,
|
||||
);
|
||||
Reference in new issue
Block a user