From ae0535215a36ccd6a61622a442b48d3dea92d17c Mon Sep 17 00:00:00 2001 From: CodeTorso <129188028+CodeTorso@users.noreply.github.com> Date: Sat, 20 Jul 2024 04:47:53 +0530 Subject: [PATCH] Revert "small commits big pr" --- apps/web/app/(auth)/signin/page.tsx | 2 +- apps/web/app/(dash)/chat/chatWindow.tsx | 2 +- apps/web/app/(dash)/chat/queryinput.tsx | 83 -- .../web/app/(dash)/dialogContentContainer.tsx | 224 ----- apps/web/app/(dash)/dialogTriggerWrapper.tsx | 50 - apps/web/app/(dash)/home/filterSpaces.tsx | 108 --- apps/web/app/(dash)/home/heading.tsx | 38 - apps/web/app/(dash)/home/history.tsx | 50 - apps/web/app/(dash)/home/homeVariants.ts | 50 + apps/web/app/(dash)/home/page.tsx | 131 ++- apps/web/app/(dash)/home/queryinput.tsx | 163 +++- apps/web/app/(dash)/layout.tsx | 8 +- apps/web/app/(dash)/menu.tsx | 481 +++++++--- apps/web/app/(onboarding)/layout.tsx | 12 - apps/web/app/(onboarding)/onboarding/page.tsx | 388 -------- apps/web/app/actions/fetchers.ts | 30 +- apps/web/app/layout.tsx | 6 +- apps/web/migrations/0001_nervous_longshot.sql | 2 - apps/web/migrations/meta/0001_snapshot.json | 905 ------------------ apps/web/migrations/meta/_journal.json | 31 +- apps/web/package.json | 103 +- apps/web/public/image.png | Bin 164761 -> 0 bytes apps/web/public/image2.png | Bin 8360 -> 0 bytes apps/web/public/image3.png | Bin 10298 -> 0 bytes apps/web/public/img.png | Bin 68722 -> 0 bytes apps/web/server/db/schema.ts | 3 +- bun.lockb | Bin 1160628 -> 1192716 bytes packages/tailwind-config/globals.css | 7 - packages/ui/icons/arrowright.svg | 4 +- packages/ui/shadcn/command.tsx | 5 +- packages/ui/shadcn/divider.tsx | 7 + packages/ui/shadcn/skeleton.tsx | 15 - 32 files changed, 706 insertions(+), 2202 deletions(-) delete mode 100644 apps/web/app/(dash)/chat/queryinput.tsx delete mode 100644 apps/web/app/(dash)/dialogContentContainer.tsx delete mode 100644 apps/web/app/(dash)/dialogTriggerWrapper.tsx delete mode 100644 apps/web/app/(dash)/home/filterSpaces.tsx delete mode 100644 apps/web/app/(dash)/home/heading.tsx delete mode 100644 apps/web/app/(dash)/home/history.tsx create mode 100644 apps/web/app/(dash)/home/homeVariants.ts delete mode 100644 apps/web/app/(onboarding)/layout.tsx delete mode 100644 apps/web/app/(onboarding)/onboarding/page.tsx delete mode 100644 apps/web/migrations/0001_nervous_longshot.sql delete mode 100644 apps/web/migrations/meta/0001_snapshot.json delete mode 100644 apps/web/public/image.png delete mode 100644 apps/web/public/image2.png delete mode 100644 apps/web/public/image3.png delete mode 100644 apps/web/public/img.png create mode 100644 packages/ui/shadcn/divider.tsx delete mode 100644 packages/ui/shadcn/skeleton.tsx diff --git a/apps/web/app/(auth)/signin/page.tsx b/apps/web/app/(auth)/signin/page.tsx index ab965325..3db512ae 100644 --- a/apps/web/app/(auth)/signin/page.tsx +++ b/apps/web/app/(auth)/signin/page.tsx @@ -64,7 +64,7 @@ async function Signin({ action={async () => { "use server"; await signIn("google", { - redirectTo: "/onboarding", + redirectTo: "/home?firstTime=true", }); }} > diff --git a/apps/web/app/(dash)/chat/chatWindow.tsx b/apps/web/app/(dash)/chat/chatWindow.tsx index 73ff8c35..f0827a3d 100644 --- a/apps/web/app/(dash)/chat/chatWindow.tsx +++ b/apps/web/app/(dash)/chat/chatWindow.tsx @@ -2,7 +2,7 @@ import { AnimatePresence } from "framer-motion"; import React, { useEffect, useRef, useState } from "react"; -import QueryInput from "./queryinput"; +import QueryInput from "../home/queryinput"; import { cn } from "@repo/ui/lib/utils"; import { motion } from "framer-motion"; import { useRouter } from "next/navigation"; diff --git a/apps/web/app/(dash)/chat/queryinput.tsx b/apps/web/app/(dash)/chat/queryinput.tsx deleted file mode 100644 index 99f55986..00000000 --- a/apps/web/app/(dash)/chat/queryinput.tsx +++ /dev/null @@ -1,83 +0,0 @@ -"use client"; - -import { ArrowRightIcon } from "@repo/ui/icons"; -import Image from "next/image"; -import React, { useState } from "react"; - -function QueryInput({ - initialSpaces, - initialQuery = "", - disabled = false, - className, - mini = false, - handleSubmit, -}: { - initialQuery?: string; - initialSpaces?: { - id: number; - name: string; - }[]; - disabled?: boolean; - className?: string; - mini?: boolean; - handleSubmit: (q: string, spaces: { id: number; name: string }[]) => void; -}) { - const [q, setQ] = useState(initialQuery); - - const [selectedSpaces, setSelectedSpaces] = useState< - { id: number; name: string }[] - >([]); - - return ( -
-
- {/* input and action button */} -
{ - if (q.trim().length === 0) { - return; - } - handleSubmit(q, selectedSpaces); - setQ(""); - }} - className="flex gap-4 p-3" - > -