diff --git a/packages/fern-dashboard/src/components/docs-page/visual-editor-section/VisualEditorContent.tsx b/packages/fern-dashboard/src/components/docs-page/visual-editor-section/VisualEditorContent.tsx index 73039c45c0..0ede7c1d53 100644 --- a/packages/fern-dashboard/src/components/docs-page/visual-editor-section/VisualEditorContent.tsx +++ b/packages/fern-dashboard/src/components/docs-page/visual-editor-section/VisualEditorContent.tsx @@ -39,9 +39,11 @@ export function VisualEditorContent({ }) { // If there's an error, show warning below header with disabled button if (error) { + const hideRightButton = error.type === "REPO_NOT_CONNECTED"; + return ( } + rightContent={hideRightButton ? undefined : } warningContent={ { + }; + return ( @@ -53,12 +58,30 @@ export function EditorNextStepsModal({ open, onOpenChange }: EditorNextStepsModa + + + Do you want to{" "} + setShowReleaseConfirm(true)} + className="text-primary hover:underline cursor-pointer" + > + release this change now + + ? + + onOpenChange(false)}> Done + ); } diff --git a/packages/fern-dashboard/src/components/editor/ReleaseConfirmDialog.tsx b/packages/fern-dashboard/src/components/editor/ReleaseConfirmDialog.tsx new file mode 100644 index 0000000000..e9003c65fb --- /dev/null +++ b/packages/fern-dashboard/src/components/editor/ReleaseConfirmDialog.tsx @@ -0,0 +1,38 @@ +"use client"; + +import { Button } from "../ui/button"; +import { Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "../ui/dialog"; + +export interface ReleaseConfirmDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; + onConfirm: () => void; +} + +export function ReleaseConfirmDialog({ open, onOpenChange, onConfirm }: ReleaseConfirmDialogProps) { + const handleConfirm = () => { + onConfirm(); + onOpenChange(false); + }; + + return ( + + + + Are you sure? + + + + This will push your changes to production. + + + + onOpenChange(false)}> + No + + Yes, release + + + + ); +}
+ Do you want to{" "} + setShowReleaseConfirm(true)} + className="text-primary hover:underline cursor-pointer" + > + release this change now + + ? +
+ This will push your changes to production. +