diff --git a/src/renderer/components/dialogs/index.ts b/src/renderer/components/dialogs/index.ts index 9ada244a72..d8c73a6080 100644 --- a/src/renderer/components/dialogs/index.ts +++ b/src/renderer/components/dialogs/index.ts @@ -1,4 +1,4 @@ -import SELECT_PROJECT_DIALOG from '@renderer/components/dialogs/select-project.dialog.old'; +import SELECT_PROJECT_DIALOG from '@renderer/components/dialogs/select-project.dialog'; import { DialogDefinition, DialogTabTypes } from './dialog.data'; /** diff --git a/src/renderer/components/dialogs/select-project.dialog.old.ts b/src/renderer/components/dialogs/select-project.dialog.old.ts deleted file mode 100644 index 6f5139aec4..0000000000 --- a/src/renderer/components/dialogs/select-project.dialog.old.ts +++ /dev/null @@ -1,18 +0,0 @@ -import DIALOG_BASE from '@renderer/components/dialogs/dialog-base.data'; -import { DialogDefinition } from '@renderer/components/dialogs/dialog.data'; -import SelectProjectTab from '@renderer/components/dialogs/select-project.dialog'; - -const SELECT_PROJECT_DIALOG_TYPE = 'platform.selectProject'; - -const SELECT_PROJECT_DIALOG: DialogDefinition = { - ...DIALOG_BASE, - tabType: SELECT_PROJECT_DIALOG_TYPE, - defaultTitle: 'Select Project', - initialSize: { - width: 500, - height: 350, - }, - Component: SelectProjectTab, -}; - -export default SELECT_PROJECT_DIALOG; diff --git a/src/renderer/components/dialogs/select-project.dialog.tsx b/src/renderer/components/dialogs/select-project.dialog.tsx index 1a0fe4095f..180075568f 100644 --- a/src/renderer/components/dialogs/select-project.dialog.tsx +++ b/src/renderer/components/dialogs/select-project.dialog.tsx @@ -5,11 +5,14 @@ import { useMemo } from 'react'; import ProjectList from '@renderer/components/project-components/project-list.component'; import usePromise from '@renderer/hooks/papi-hooks/use-promise.hook'; import projectLookupService from '@shared/services/project-lookup.service'; -import { DialogProps } from '@renderer/components/dialogs/dialog-base.data'; +import DIALOG_BASE, { DialogProps } from '@renderer/components/dialogs/dialog-base.data'; +import { DialogDefinition } from '@renderer/components/dialogs/dialog.data'; -type SelectProjectTabProps = DialogProps; +type SelectProjectDialogProps = DialogProps; -export default function SelectProjectTab({ prompt, submitDialog }: SelectProjectTabProps) { +const SELECT_PROJECT_DIALOG_TYPE = 'platform.selectProject'; + +function SelectProjectDialog({ prompt, submitDialog }: SelectProjectDialogProps) { const [projects, isLoadingProjects] = usePromise( projectLookupService.getMetadataForAllProjects, useMemo(() => [], []), @@ -30,3 +33,16 @@ export default function SelectProjectTab({ prompt, submitDialog }: SelectProject ); } + +const SELECT_PROJECT_DIALOG: DialogDefinition = { + ...DIALOG_BASE, + tabType: SELECT_PROJECT_DIALOG_TYPE, + defaultTitle: 'Select Project', + initialSize: { + width: 500, + height: 350, + }, + Component: SelectProjectDialog, +}; + +export default SELECT_PROJECT_DIALOG;