From 67901f25329865f16057c6aa1a1ea372056e92e9 Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Sun, 21 Jul 2024 10:39:34 -0500 Subject: [PATCH] launch fixes: fix onboarding and no dead buttons --- apps/web/app/(auth)/onboarding/page.tsx | 9 +- apps/web/app/(dash)/menu.tsx | 298 ++++++++++++------------ 2 files changed, 157 insertions(+), 150 deletions(-) diff --git a/apps/web/app/(auth)/onboarding/page.tsx b/apps/web/app/(auth)/onboarding/page.tsx index 1912a8e8..c402c560 100644 --- a/apps/web/app/(auth)/onboarding/page.tsx +++ b/apps/web/app/(auth)/onboarding/page.tsx @@ -9,7 +9,7 @@ import { } from "@heroicons/react/24/solid"; import { CheckIcon, PlusCircleIcon } from "@heroicons/react/24/outline"; import { motion } from "framer-motion"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { toast } from "sonner"; import { createMemory } from "@repo/web/app/actions/doers"; import { useRouter } from "next/navigation"; @@ -20,6 +20,13 @@ import gradientStyle from "../signin/_components/TextGradient/gradient.module.cs export default function Home() { const [currStep, setCurrStep] = useState(0); + const { push } = useRouter(); + + useEffect(() => { + if (currStep > 3) { + push("/home?q=what%20is%20supermemory"); + } + }, [currStep]); return (
diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx index 0b487e61..e5501958 100644 --- a/apps/web/app/(dash)/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -1,176 +1,176 @@ -import React from 'react'; -import Image from 'next/image'; -import Link from 'next/link'; -import { MemoriesIcon, CanvasIcon, AddIcon } from '@repo/ui/icons'; -import { DialogTrigger } from '@repo/ui/shadcn/dialog'; +import React from "react"; +import Image from "next/image"; +import Link from "next/link"; +import { MemoriesIcon, CanvasIcon, AddIcon } from "@repo/ui/icons"; +import { DialogTrigger } from "@repo/ui/shadcn/dialog"; -import { HomeIcon } from '@heroicons/react/24/solid'; +import { HomeIcon } from "@heroicons/react/24/solid"; import { - PencilSquareIcon, - PlusIcon, - PresentationChartLineIcon, - RectangleStackIcon, -} from '@heroicons/react/24/solid'; + PencilSquareIcon, + PlusIcon, + PresentationChartLineIcon, + RectangleStackIcon, +} from "@heroicons/react/24/solid"; import DialogTriggerWrapper, { - DialogDesktopTrigger, - DialogMobileTrigger, -} from './dialogTriggerWrapper'; + DialogDesktopTrigger, + DialogMobileTrigger, +} from "./dialogTriggerWrapper"; const menuItems = [ - { - icon: MemoriesIcon, - text: 'Memories', - url: '/memories', - disabled: false, - }, - { - icon: CanvasIcon, - text: 'Canvas', - url: '/canvas', - disabled: true, - }, + { + icon: MemoriesIcon, + text: "Memories", + url: "/memories", + disabled: false, + }, + { + icon: CanvasIcon, + text: "Canvas", + url: "/canvas", + disabled: true, + }, ]; const items = [ - { - icon: , - name: 'home', - url: '/home', - disabled: false, - }, - { - icon: , - name: 'memories', - url: '/memories', - disabled: false, - }, - { - icon: , - name: 'editor', - url: '/#', - disabled: true, - }, - { - icon: , - name: 'thinkpad', - url: '/#', - disabled: true, - }, + { + icon: , + name: "home", + url: "/home", + disabled: false, + }, + { + icon: , + name: "memories", + url: "/memories", + disabled: false, + }, + // { + // icon: , + // name: 'editor', + // url: '/#', + // disabled: true, + // }, + // { + // icon: , + // name: 'thinkpad', + // url: '/#', + // disabled: true, + // }, ]; function Menu() { - return ( - <> - {/* Desktop Menu */} -
-
-
- -
- {items.map((v) => ( - - ))} -
-
-
+ return ( + <> + {/* Desktop Menu */} +
+
+
+ +
+ {items.map((v) => ( + + ))} +
+
+
- {/* Mobile Menu */} -
-
- - -

Home

- + {/* Mobile Menu */} +
+
+ + +

Home

+ - - {menuItems.map((item) => ( - - {`${item.text} -

{item.text}

- - ))} -
-
- - ); + + {menuItems.map((item) => ( + + {`${item.text} +

{item.text}

+ + ))} +
+
+ + ); } export function Navbar() { - return ( -
-
-
-
- - {items.map((v) => ( - - ))} -
-
-
- ); + return ( +
+
+
+
+ + {items.map((v) => ( + + ))} +
+
+
+ ); } function Top() { - return ( - - -
-
- -
-
-
- Add Memories -
-
-
-
- ); + return ( + + +
+
+ +
+
+
+ Add Memories +
+
+
+
+ ); } function NavItem({ - disabled, - icon, - url, - name, + disabled, + icon, + url, + name, }: { - disabled: boolean; - icon: React.JSX.Element; - name: string; - url: string; + disabled: boolean; + icon: React.JSX.Element; + name: string; + url: string; }) { - return ( -
- -
- {icon} -
- -
- {name} -
-
- ); + return ( +
+ +
+ {icon} +
+ +
+ {name} +
+
+ ); } export default Menu;