chore: remove react-doctor from package scripts and update task dependencies in turbo.json

This commit is contained in:
Amruth Pillai
2026-05-27 11:09:33 +02:00
parent b04eef1479
commit 8461aa65d5
9 changed files with 68 additions and 1224 deletions
@@ -1,3 +1,4 @@
import type { StateStorage } from "zustand/middleware";
import type { SidebarSection } from "@/libs/resume/section";
import { createJSONStorage, persist } from "zustand/middleware";
import { immer } from "zustand/middleware/immer";
@@ -20,6 +21,18 @@ type SectionStoreActions = {
type SectionStore = SectionStoreState & SectionStoreActions;
const noopStorage: StateStorage = {
getItem: () => null,
removeItem: () => {},
setItem: () => {},
};
const getSectionStoreStorage = () => {
if (typeof window === "undefined") return noopStorage;
return window.localStorage ?? noopStorage;
};
export const useSectionStore = create<SectionStore>()(
persist(
immer((set) => ({
@@ -46,7 +59,7 @@ export const useSectionStore = create<SectionStore>()(
})),
{
name: "section-store",
storage: createJSONStorage(() => localStorage),
storage: createJSONStorage(getSectionStoreStorage),
partialize: (state) => ({
sections: state.sections,
}),