You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/client/shared/store/globalConfig.ts

18 lines
411 B
TypeScript

import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { GlobalConfig } from '../model/config';
import { defaultGlobalConfig } from '../utils/consts';
type GlobalConfigState = GlobalConfig;
export const useGlobalConfigStore = create<GlobalConfigState>()(
persist(
(set) => ({
...defaultGlobalConfig,
}),
{
name: 'globalConfigStore',
}
)
);