mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
feat: sync api collection will refresh title;perf: invite link ux (#4237)
* update queue * feat: sync api collection will refresh title * sync collection * remove lock * perf: invite link ux
This commit is contained in:
25
packages/web/store/useCommonStore.ts
Normal file
25
packages/web/store/useCommonStore.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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) => ({})
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
Reference in New Issue
Block a user