From ff3ebed49319c72969de98f97f4df6605f2ce082 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 25 Oct 2023 08:33:13 +0100 Subject: [PATCH] Update UI for create your own version --- .../CreateVersion/CreateVersion.tsx | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/src/components/CreateVersion/CreateVersion.tsx b/src/components/CreateVersion/CreateVersion.tsx index 777ce6a5b..eeb1fc312 100644 --- a/src/components/CreateVersion/CreateVersion.tsx +++ b/src/components/CreateVersion/CreateVersion.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { httpPost } from '../../lib/http'; import { useToast } from '../../hooks/use-toast'; import { isLoggedIn } from '../../lib/jwt'; -import { Layers2, Loader2 } from 'lucide-react'; +import { GitFork, Layers2, Loader2 } from 'lucide-react'; import { showLoginPopup } from '../../lib/popup'; type CreateVersionProps = { @@ -14,6 +14,7 @@ export function CreateVersion(props: CreateVersionProps) { const toast = useToast(); const [isLoading, setIsLoading] = useState(false); + const [isConfirming, setIsConfirming] = useState(false); async function createVersion() { if (isLoading || !roadmapId) { @@ -45,18 +46,47 @@ export function CreateVersion(props: CreateVersionProps) { window.open(roadmapEditorUrl, '_blank'); } + if (isConfirming) { + return ( +

+ Create and edit a custom roadmap from this? + +  /  + +

+ ); + } + return ( ); }