Moved collapse button.

This commit is contained in:
Mike Cao 2025-03-22 01:31:51 -07:00
parent 5d2c1e27c2
commit adca3c36d0
7 changed files with 1883 additions and 37 deletions

View file

@ -0,0 +1,13 @@
import { create } from 'zustand';
const store = create(() => ({}));
const useGlobalState = (key: string, value?: any) => {
if (value !== undefined && !store.getState()[key]) {
store.setState({ [key]: value });
}
return [store(state => state[key]), (value: any) => store.setState({ [key]: value })];
};
export default useGlobalState;