diff --git a/app/(content)/(home)/home/page.tsx b/app/(content)/(home)/home/page.tsx index d159dec93d31a425d2d95cafcdb5c7c75e31e0e3..fe63738edf9ffbc83613d7429f5361cd4b390c7a 100644 --- a/app/(content)/(home)/home/page.tsx +++ b/app/(content)/(home)/home/page.tsx @@ -4,6 +4,7 @@ import { Gweets } from "@/components/gweets/components/gweets" import ScrollToTop from "@/components/scroll-to-top" import { Trends } from "@/components/trends/components/trends" import { Card } from "@/components/ui/card" +import getURL from "@/lib/utils" export default async function HomePage() { return ( @@ -14,6 +15,7 @@ export default async function HomePage() { <ScrollToTop /> </div> <div className="w-full space-y-6 flex flex-col"> + <div>{getURL(`/api/users/`)}</div> <CreateGweet /> <Gweets /> </div> diff --git a/app/(content)/(user)/[username]/(profile)/layout.tsx b/app/(content)/(user)/[username]/(profile)/layout.tsx index 6e611330b5fc524f89d14a04309f4a3708dbfb17..f79ac51af8414f111f180c3ba913c54d01be8dbe 100644 --- a/app/(content)/(user)/[username]/(profile)/layout.tsx +++ b/app/(content)/(user)/[username]/(profile)/layout.tsx @@ -17,7 +17,7 @@ export default async function ProfileLayout({ children: React.ReactNode }) { const user = await fetch(getURL(`/api/users/${params.username}`)).then((result) => result.json()) - console.log("layout layer", user) + return ( <GlobalLayout mainContent={ diff --git a/app/api/users/[username]/route.ts b/app/api/users/[username]/route.ts index 096a535c0af01ab536b9d4b10f23bc834c9c0137..e089b9b7276365c1e9cc1d0131039894fc72fe11 100644 --- a/app/api/users/[username]/route.ts +++ b/app/api/users/[username]/route.ts @@ -4,7 +4,7 @@ import { z } from "zod" export async function GET(request: Request, context: { params: { username: string } }) { const { username } = context.params - console.log("api layer", username) + const idSchema = z.string() const zod = idSchema.safeParse(username)