aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2024-08-02 09:09:22 -0700
committerDhravya Shah <[email protected]>2024-08-02 09:09:22 -0700
commit097fa81fc93a1b2be37e07c1f2afabdfa8beacdd (patch)
tree5c48689ddeb4ae4ff86ba727383430c1b5d23cf6
parentnevermind. disabled sentry. again. (diff)
downloadsupermemory-097fa81fc93a1b2be37e07c1f2afabdfa8beacdd.tar.xz
supermemory-097fa81fc93a1b2be37e07c1f2afabdfa8beacdd.zip
fix: people skipping onboarding should still have supermemory.ai saved
-rw-r--r--apps/web/app/(auth)/onboarding/page.tsx30
1 files changed, 25 insertions, 5 deletions
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: <PlusCircleIcon className="w-4 h-4 text-white animate-spin" />,
+ 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");
};