teableio/teable

View on GitHub
apps/nextjs-app/src/features/app/components/setting/useSettingStore.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { create } from 'zustand';

interface ISettingState {
  open: boolean;
  setOpen: (open: boolean) => void;
}

export const useSettingStore = create<ISettingState>((set) => ({
  open: false,
  setOpen: (open: boolean) => {
    set((state) => {
      return {
        ...state,
        open,
      };
    });
  },
}));