mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-24 00:24:54 +01:00
21 lines
738 B
TypeScript
21 lines
738 B
TypeScript
import { WorkspaceSettingsDialog } from '../components/WorkspaceSettingsDialog';
|
|
import { activeWorkspaceIdAtom } from '../hooks/useActiveWorkspace';
|
|
import { createFastMutation } from '../hooks/useFastMutation';
|
|
import { showDialog } from '../lib/dialog';
|
|
import { jotaiStore } from '../lib/jotai';
|
|
|
|
export const openWorkspaceSettings = createFastMutation<void, string>({
|
|
mutationKey: ['open_workspace_settings'],
|
|
async mutationFn() {
|
|
const workspaceId = jotaiStore.get(activeWorkspaceIdAtom);
|
|
showDialog({
|
|
id: 'workspace-settings',
|
|
title: 'Workspace Settings',
|
|
size: 'md',
|
|
render({ hide }) {
|
|
return <WorkspaceSettingsDialog workspaceId={workspaceId} hide={hide} />;
|
|
},
|
|
});
|
|
},
|
|
});
|