mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-21 06:23:59 +00:00
fix: people skipping onboarding should still have supermemory.ai saved
This commit is contained in:
parent
bf6e2e7666
commit
097fa81fc9
1 changed files with 25 additions and 5 deletions
|
|
@ -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");
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue