fix: Allow duplicating a draft as a published doc

This commit is contained in:
Tom Moor
2024-04-13 22:32:52 -04:00
parent 9e8df4dd2d
commit ca4d85cf19

View File

@@ -64,8 +64,9 @@ function DuplicateDialog({ document, onSubmit }: Props) {
maxLength={DocumentValidation.maxTitleLength}
defaultValue={defaultTitle}
/>
{document.publishedAt && !document.isTemplate && (
{!document.isTemplate && (
<>
{document.collectionId && (
<Text size="small">
<Switch
name="publish"
@@ -75,6 +76,8 @@ function DuplicateDialog({ document, onSubmit }: Props) {
onChange={handlePublishChange}
/>
</Text>
)}
{document.publishedAt && (
<Text size="small">
<Switch
name="recursive"
@@ -84,6 +87,7 @@ function DuplicateDialog({ document, onSubmit }: Props) {
onChange={handleRecursiveChange}
/>
</Text>
)}
</>
)}
</ConfirmationDialog>