mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 19:01:14 +01:00
Fix workspace creation, reveal sync dir, and don't update timestamps on sync/import
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
import type { WorkspaceMeta } from '@yaakapp-internal/models';
|
||||
import { atom, useAtomValue } from 'jotai';
|
||||
|
||||
export const workspaceMetaAtom = atom<WorkspaceMeta>();
|
||||
export const workspaceMetaAtom = atom<WorkspaceMeta | null>(null);
|
||||
|
||||
export function useWorkspaceMeta() {
|
||||
const workspaceMeta = useAtomValue(workspaceMetaAtom);
|
||||
if (!workspaceMeta) {
|
||||
throw new Error('WorkspaceMeta not found');
|
||||
}
|
||||
|
||||
return workspaceMeta;
|
||||
return useAtomValue(workspaceMetaAtom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user