diff --git a/apps/web/app/(auth)/signin/page.tsx b/apps/web/app/(auth)/signin/page.tsx index 3b563b90..c7cceec5 100644 --- a/apps/web/app/(auth)/signin/page.tsx +++ b/apps/web/app/(auth)/signin/page.tsx @@ -1,26 +1,14 @@ import Image from "next/image"; import Link from "next/link"; import Logo from "@/public/logo.svg"; -import { auth, signIn } from "@/server/auth"; +import { signIn } from "@/server/auth"; import { Google } from "@repo/ui/components/icons"; import gradientStyle from "./_components/TextGradient/gradient.module.css"; import { cn } from "@repo/ui/lib/utils"; -import { redirect } from "next/navigation"; -import { toast } from "sonner"; export const runtime = "edge"; -async function Signin({ - searchParams, -}: { - searchParams: Record; -}) { - const user = await auth(); - - if (user) { - redirect("/home"); - } - +async function Signin() { return (
diff --git a/apps/web/app/(dash)/(memories)/content.tsx b/apps/web/app/(dash)/(memories)/content.tsx index 4514d851..8205c8b6 100644 --- a/apps/web/app/(dash)/(memories)/content.tsx +++ b/apps/web/app/(dash)/(memories)/content.tsx @@ -1,7 +1,7 @@ "use client"; -import { Content, StoredSpace } from "@/server/db/schema"; -import { MemoriesIcon, NextIcon, SearchIcon, UrlIcon } from "@repo/ui/icons"; +import type { Content, StoredSpace } from "@/server/db/schema"; +import { MemoriesIcon, NextIcon, UrlIcon } from "@repo/ui/icons"; import { ArrowLeftIcon, MenuIcon, @@ -12,17 +12,15 @@ import { } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; -import React, { useEffect, useMemo, useState } from "react"; +import React, { useMemo, useState } from "react"; import Masonry from "react-layout-masonry"; import { getRawTweet } from "@repo/shared-types/utils"; -import { MyTweet } from "../../../components/twitter/render-tweet"; +import { MyTweet } from "@/components/twitter/render-tweet"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, - DropdownMenuLabel, DropdownMenuPortal, - DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, diff --git a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx index ed1ea1cc..c7508ef4 100644 --- a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx +++ b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx @@ -4,11 +4,8 @@ import MemoriesPage from "../../content"; import { db } from "@/server/db"; import { and, eq } from "drizzle-orm"; import { spacesAccess } from "@/server/db/schema"; -import { auth } from "@/server/auth"; async function Page({ params: { spaceid } }: { params: { spaceid: number } }) { - const user = await auth(); - const { success, data } = await getMemoriesInsideSpace(spaceid); if (!success ?? !data) return redirect("/home"); diff --git a/apps/web/app/(dash)/chat/[chatid]/loading.tsx b/apps/web/app/(dash)/chat/[chatid]/loading.tsx index 422adb8e..dbb9290c 100644 --- a/apps/web/app/(dash)/chat/[chatid]/loading.tsx +++ b/apps/web/app/(dash)/chat/[chatid]/loading.tsx @@ -1,5 +1,4 @@ import React from "react"; -import { chatSearchParamsCache } from "../../../../lib/searchParams"; import ChatWindow from "../chatWindow"; async function Page({ diff --git a/apps/web/app/(dash)/dialogContentContainer.tsx b/apps/web/app/(dash)/dialogContentContainer.tsx index 4e8d81ef..cb8c4ce1 100644 --- a/apps/web/app/(dash)/dialogContentContainer.tsx +++ b/apps/web/app/(dash)/dialogContentContainer.tsx @@ -1,9 +1,9 @@ -import { StoredSpace } from "@/server/db/schema"; +import type { StoredSpace } from "@/server/db/schema"; import { useEffect, useMemo, useState } from "react"; -import { createMemory, createSpace } from "../actions/doers"; +import { createMemory, createSpace } from "@/app/actions/doers"; import ComboboxWithCreate from "@repo/ui/shadcn/combobox"; import { toast } from "sonner"; -import { getSpaces } from "../actions/fetchers"; +import { getSpaces } from "@/app/actions/fetchers"; import { MinusIcon, PlusCircleIcon } from "lucide-react"; import { DialogContent, diff --git a/apps/web/app/(dash)/header/header.tsx b/apps/web/app/(dash)/header/header.tsx index eaade258..079b350c 100644 --- a/apps/web/app/(dash)/header/header.tsx +++ b/apps/web/app/(dash)/header/header.tsx @@ -1,9 +1,9 @@ import React from "react"; import Image from "next/image"; import Link from "next/link"; -import Logo from "../../../public/logo.svg"; +import Logo from "@/public/logo.svg"; -import { getChatHistory } from "../../actions/fetchers"; +import { getChatHistory } from "@/app/actions/fetchers"; import NewChatButton from "./newChatButton"; import AutoBreadCrumbs from "./autoBreadCrumbs"; import SignOutButton from "./signOutButton"; diff --git a/apps/web/app/(dash)/header/signOutButton.tsx b/apps/web/app/(dash)/header/signOutButton.tsx index 4c61c74d..fb4049ea 100644 --- a/apps/web/app/(dash)/header/signOutButton.tsx +++ b/apps/web/app/(dash)/header/signOutButton.tsx @@ -5,8 +5,10 @@ export default function SignOutButton() { return (
{ - "use server"; - await signOut(); + "use server" + await signOut({ + redirectTo: "/", + }); }} >