mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-01 15:13:04 +02:00
A bunch of fixes
This commit is contained in:
@@ -21,9 +21,11 @@ export function getActiveWorkspaceId() {
|
||||
return jotaiStore.get(activeWorkspaceIdAtom) ?? null;
|
||||
}
|
||||
|
||||
export function getActiveWorkspace() {
|
||||
return jotaiStore.get(activeWorkspaceAtom) ?? null;
|
||||
}
|
||||
|
||||
export function useSubscribeActiveWorkspaceId() {
|
||||
const { workspaceId } = useParams({ strict: false });
|
||||
useEffect(() => {
|
||||
jotaiStore.set(activeWorkspaceIdAtom, workspaceId);
|
||||
}, [workspaceId]);
|
||||
useEffect(() => jotaiStore.set(activeWorkspaceIdAtom, workspaceId), [workspaceId]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user