diff options
| -rw-r--r-- | apps/web/app/(dash)/chat/actions.ts (renamed from apps/web/app/home/actions.ts) | 0 | ||||
| -rw-r--r-- | apps/web/app/(dash)/chat/chatWindow.tsx (renamed from apps/web/app/chat/chatWindow.tsx) | 0 | ||||
| -rw-r--r-- | apps/web/app/(dash)/chat/page.tsx | 14 | ||||
| -rw-r--r-- | apps/web/app/(dash)/header.tsx (renamed from apps/web/app/home/header.tsx) | 0 | ||||
| -rw-r--r-- | apps/web/app/(dash)/home/page.tsx | 27 | ||||
| -rw-r--r-- | apps/web/app/(dash)/home/queryinput.tsx (renamed from apps/web/app/home/queryinput.tsx) | 3 | ||||
| -rw-r--r-- | apps/web/app/(dash)/layout.tsx | 17 | ||||
| -rw-r--r-- | apps/web/app/(dash)/menu.tsx (renamed from apps/web/app/home/menu.tsx) | 1 | ||||
| -rw-r--r-- | apps/web/app/(landing)/package.json | 5 | ||||
| -rw-r--r-- | apps/web/app/chat/page.tsx | 24 | ||||
| -rw-r--r-- | apps/web/app/home/page.tsx | 33 |
11 files changed, 64 insertions, 60 deletions
diff --git a/apps/web/app/home/actions.ts b/apps/web/app/(dash)/chat/actions.ts index 908fe79e..908fe79e 100644 --- a/apps/web/app/home/actions.ts +++ b/apps/web/app/(dash)/chat/actions.ts diff --git a/apps/web/app/chat/chatWindow.tsx b/apps/web/app/(dash)/chat/chatWindow.tsx index 8361bbf8..8361bbf8 100644 --- a/apps/web/app/chat/chatWindow.tsx +++ b/apps/web/app/(dash)/chat/chatWindow.tsx diff --git a/apps/web/app/(dash)/chat/page.tsx b/apps/web/app/(dash)/chat/page.tsx new file mode 100644 index 00000000..4ad4d468 --- /dev/null +++ b/apps/web/app/(dash)/chat/page.tsx @@ -0,0 +1,14 @@ +import { chatSearchParamsCache } from "../../helpers/lib/searchParams"; +import ChatWindow from "./chatWindow"; + +function Page({ + searchParams, +}: { + searchParams: Record<string, string | string[] | undefined>; +}) { + const { firstTime, q, spaces } = chatSearchParamsCache.parse(searchParams); + + return <ChatWindow q={q} spaces={spaces ?? []} />; +} + +export default Page; diff --git a/apps/web/app/home/header.tsx b/apps/web/app/(dash)/header.tsx index bcbe9691..bcbe9691 100644 --- a/apps/web/app/home/header.tsx +++ b/apps/web/app/(dash)/header.tsx diff --git a/apps/web/app/(dash)/home/page.tsx b/apps/web/app/(dash)/home/page.tsx new file mode 100644 index 00000000..a6624c1b --- /dev/null +++ b/apps/web/app/(dash)/home/page.tsx @@ -0,0 +1,27 @@ +import React from "react"; +import Menu from "../menu"; +import Header from "../header"; +import QueryInput from "./queryinput"; +import { homeSearchParamsCache } from "@/app/helpers/lib/searchParams"; + +function Page({ + searchParams, +}: { + searchParams: Record<string, string | string[] | undefined>; +}) { + // TODO: use this to show a welcome page/modal + const { firstTime } = homeSearchParamsCache.parse(searchParams); + + return ( + <div className="max-w-3xl flex mx-auto w-full flex-col"> + {/* all content goes here */} + {/* <div className="">hi {firstTime ? 'first time' : ''}</div> */} + + <div className="w-full h-96"> + <QueryInput /> + </div> + </div> + ); +} + +export default Page; diff --git a/apps/web/app/home/queryinput.tsx b/apps/web/app/(dash)/home/queryinput.tsx index a0e25d83..904fcca6 100644 --- a/apps/web/app/home/queryinput.tsx +++ b/apps/web/app/(dash)/home/queryinput.tsx @@ -2,10 +2,9 @@ import { ArrowRightIcon } from "@repo/ui/icons"; import Image from "next/image"; -import React, { useCallback, useState } from "react"; +import React, { useState } from "react"; import Divider from "@repo/ui/shadcn/divider"; import { MultipleSelector, Option } from "@repo/ui/shadcn/combobox"; -import { AnimatePresence } from "framer-motion"; import { useRouter } from "next/navigation"; const OPTIONS: Option[] = [ diff --git a/apps/web/app/(dash)/layout.tsx b/apps/web/app/(dash)/layout.tsx new file mode 100644 index 00000000..07c16485 --- /dev/null +++ b/apps/web/app/(dash)/layout.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import Header from "./header"; +import Menu from "./menu"; + +function Layout({ children }: { children: React.ReactNode }) { + return ( + <main className="h-screen flex flex-col p-4 relative"> + <Header /> + + <Menu /> + + {children} + </main> + ); +} + +export default Layout; diff --git a/apps/web/app/home/menu.tsx b/apps/web/app/(dash)/menu.tsx index 35a75ef9..1177bca6 100644 --- a/apps/web/app/home/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -1,6 +1,5 @@ import React from "react"; import Image from "next/image"; -import Link from "next/link"; import { MemoriesIcon, ExploreIcon, HistoryIcon } from "@repo/ui/icons"; function Menu() { diff --git a/apps/web/app/(landing)/package.json b/apps/web/app/(landing)/package.json new file mode 100644 index 00000000..a7fabf2f --- /dev/null +++ b/apps/web/app/(landing)/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "vercel-build": "next build" + } +} diff --git a/apps/web/app/chat/page.tsx b/apps/web/app/chat/page.tsx deleted file mode 100644 index bfe0c362..00000000 --- a/apps/web/app/chat/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { chatSearchParamsCache } from "../helpers/lib/searchParams"; -import Menu from "../home/menu"; -import Header from "../home/header"; -import ChatWindow from "./chatWindow"; - -function Page({ - searchParams, -}: { - searchParams: Record<string, string | string[] | undefined>; -}) { - const { firstTime, q, spaces } = chatSearchParamsCache.parse(searchParams); - - return ( - <main className="h-screen flex flex-col p-4 relative"> - <Menu /> - - <Header /> - - <ChatWindow q={q} spaces={spaces ?? []} /> - </main> - ); -} - -export default Page; diff --git a/apps/web/app/home/page.tsx b/apps/web/app/home/page.tsx deleted file mode 100644 index 9908c017..00000000 --- a/apps/web/app/home/page.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react"; -import Menu from "./menu"; -import Header from "./header"; -import QueryInput from "./queryinput"; -import { homeSearchParamsCache } from "@/app/helpers/lib/searchParams"; - -function Page({ - searchParams, -}: { - searchParams: Record<string, string | string[] | undefined>; -}) { - // TODO: use this to show a welcome page/modal - const { firstTime } = homeSearchParamsCache.parse(searchParams); - - return ( - <main className="h-screen flex flex-col p-4 relative"> - <Menu /> - - <Header /> - - <div className="max-w-3xl flex mx-auto w-full flex-col"> - {/* all content goes here */} - {/* <div className="">hi {firstTime ? 'first time' : ''}</div> */} - - <div className="w-full h-96"> - <QueryInput /> - </div> - </div> - </main> - ); -} - -export default Page; |