From 539e1607bddeafcdda4b75cedc00f76ae661651d Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Sun, 18 Feb 2024 02:31:54 -0500 Subject: [PATCH] fix: fixed how the wizard for onboarding works. it still skips the manage portfolio step but meh. --- pages/dashboard/index.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pages/dashboard/index.tsx b/pages/dashboard/index.tsx index 4f2b944..88285e5 100644 --- a/pages/dashboard/index.tsx +++ b/pages/dashboard/index.tsx @@ -29,6 +29,7 @@ import Orders from '../../components/Orders' const Dashboard = () => { const [profileData, setSellerProfileData] = useState(null); const [requestData, setSellerRequestData] = useState(null); + const [onboardData, setOnboardedData] = useState(false); const [onboarding, setOnboarding] = useState(false); const [onboarded, setOnboarded] = useState(false); @@ -44,6 +45,9 @@ const Dashboard = () => { const requestResponse = await fetch('/api/artist/request'); const sellerRequest = await requestResponse.json(); setSellerRequestData(sellerRequest); + const onboardedResponse = await fetch('/api/artist/onboarded'); + const onboardedData = await onboardedResponse.json(); + setOnboardedData(onboardedData["onboarded"]); setTimeout(getData, 5000); // Poll every 5 seconds (adjust as needed) @@ -80,20 +84,21 @@ const Dashboard = () => { - {( onboarding==true && onboarded==false) ? ( + {( onboarding==true && onboardData==false ) ? ( ):( - (onboarded) ? ( + (onboarding) ? ( - - - THIS IS A TEST - + + + + +