Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
barankyle committed Mar 27, 2024
1 parent 48c716c commit 5fd3f2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/editor/src/components/EditorContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,19 @@ const onSaveAs = async () => {
const onCopyScene = async () => {
const { projectName, sceneName } = getState(EditorState)
const abortController = new AbortController()
const result = await new Promise((resolve) => {
const result = (await new Promise((resolve) => {
DialogState.setDialog(
<CopySceneDialog
currentSceneName={sceneName}
currentProjectName={projectName}
currentSceneName={sceneName!}
currentProjectName={projectName!}
onConfirm={resolve}
onCancel={resolve}
/>
)
})
})) as { name: string; projectName: string }
DialogState.setDialog(null)
if (result?.name && result?.projectName) {
await saveScene(result?.projectName, result.name, abortController.signal)
await saveScene(result.projectName, result.name, abortController.signal)
}
}

Expand Down
8 changes: 5 additions & 3 deletions packages/editor/src/components/dialogs/CopySceneDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ export function CopySceneDialog({
onConfirm,
onCancel
}: {
currentSceneName: string
currentProjectName: string
onConfirm: (val: { name: string; projectName: string }) => void
onCancel: (val?: boolean) => void
onCancel: (val?: {}) => void
}) {
const name = useHookstate('')
const { t } = useTranslation()
Expand Down Expand Up @@ -108,8 +110,8 @@ export function CopySceneDialog({
>
<div style={{ width: '100%' }}>
<div style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
<div style={}>Current Scene: {currentSceneName}</div>
<div style={}>Current Project: {currentProjectName}</div>
<div>Current Scene: {currentSceneName}</div>
<div>Current Project: {currentProjectName}</div>
<FormField>
<label htmlFor="name">{t('editor:dialog.copyScene.lbl-name')}</label>
<StringInput
Expand Down

0 comments on commit 5fd3f2b

Please sign in to comment.