From 097fa81fc93a1b2be37e07c1f2afabdfa8beacdd Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Fri, 2 Aug 2024 09:09:22 -0700 Subject: fix: people skipping onboarding should still have supermemory.ai saved --- apps/web/app/(auth)/onboarding/page.tsx | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/web/app/(auth)/onboarding/page.tsx b/apps/web/app/(auth)/onboarding/page.tsx index 5b728928..93e07e73 100644 --- a/apps/web/app/(auth)/onboarding/page.tsx +++ b/apps/web/app/(auth)/onboarding/page.tsx @@ -26,11 +26,13 @@ export default function Home() { await completeOnboarding(); }; if (currStep > 3) { - updateDb().then(() => { - push("/home?q=what%20is%20supermemory"); - }).catch((e) => { - console.error(e); - }); + updateDb() + .then(() => { + push("/home?q=what%20is%20supermemory"); + }) + .catch((e) => { + console.error(e); + }); } }, [currStep]); @@ -390,6 +392,24 @@ function Navbar() { const router = useRouter(); const handleSkip = async () => { await completeOnboarding(); + toast.info("Creating memory...", { + icon: , + duration: 7500, + }); + + const cont = await createMemory({ + content: "https://supermemory.ai", + spaces: undefined, + }); + + if (cont.success) { + toast.success("Memory created", { + richColors: true, + }); + } else { + toast.error(`Memory creation failed: ${cont.error}`); + } + router.push("/home?q=what%20is%20supermemory"); }; -- cgit v1.2.3