mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00

* update queue * feat: sync api collection will refresh title * sync collection * remove lock * perf: invite link ux
26 lines
512 B
TypeScript
26 lines
512 B
TypeScript
import { create, devtools, persist, immer } from '../common/zustand';
|
|
|
|
type State = {
|
|
copyContent?: string;
|
|
setCopyContent: (val?: string) => void;
|
|
};
|
|
|
|
export const useCommonStore = create<State>()(
|
|
devtools(
|
|
persist(
|
|
immer((set, get) => ({
|
|
copyContent: undefined,
|
|
setCopyContent(val) {
|
|
set((state) => {
|
|
state.copyContent = val;
|
|
});
|
|
}
|
|
})),
|
|
{
|
|
name: 'commonStore',
|
|
partialize: (state) => ({})
|
|
}
|
|
)
|
|
)
|
|
);
|