mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 10:51:26 +01:00
Clean up model fetching and loading states
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import type { WorkspaceMeta } from '@yaakapp-internal/models';
|
||||
import { atom, useAtomValue } from 'jotai';
|
||||
import { jotaiStore } from '../lib/jotai';
|
||||
|
||||
export const workspaceMetaAtom = atom<WorkspaceMeta | null>(null);
|
||||
|
||||
export function useWorkspaceMeta() {
|
||||
return useAtomValue(workspaceMetaAtom);
|
||||
}
|
||||
|
||||
export function getWorkspaceMeta() {
|
||||
return jotaiStore.get(workspaceMetaAtom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user