refactor: move more files to typescript

This commit is contained in:
Prayag Prajapati committed 2024-12-03 22:21:48 +05:30
1 parent 97526e29b4
commit cf8c5d4490
20 files changed
+123 -177

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { shallow } from "zustand/shallow";
import { createWithEqualityFn } from "zustand/traditional";
type CarouselStore = {
direction: "left" | "right";
setDirection: (dir: "left" | "right") => void;
};
export const useCarouselStore = createWithEqualityFn<CarouselStore>(
(set) => ({
direction: "right",
setDirection: (dir) => set(() => ({ direction: dir })),
}),
shallow,
);