mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 13:43:39 +01:00
17 lines
447 B
TypeScript
17 lines
447 B
TypeScript
import { useCallback } from 'react';
|
|
import { CreateWorkspaceDialog } from '../components/CreateWorkspaceDialog';
|
|
import { useDialog } from './useDialog';
|
|
|
|
export function useCreateWorkspace() {
|
|
const dialog = useDialog();
|
|
|
|
return useCallback(() => {
|
|
dialog.show({
|
|
id: 'create-workspace',
|
|
title: 'Create Workspace',
|
|
size: 'md',
|
|
render: ({ hide }) => <CreateWorkspaceDialog hide={hide} />,
|
|
});
|
|
}, [dialog]);
|
|
}
|