File tree Expand file tree Collapse file tree 4 files changed +37
-33
lines changed
api/protected/user/[userId] Expand file tree Collapse file tree 4 files changed +37
-33
lines changed Original file line number Diff line number Diff line change @@ -33,26 +33,26 @@ turbo dev
3333
3434# Libraries
3535
36- - ReactJS
37- - TypeScript
38- - NextJS 14 - App router and server actions
39- - next-auth
40- - Prisma ORM
41- - Postgres
42- - Turborepo
43- - TailwindCSS
44- - shadcn
45- - next-themes
46- - Zod validation
36+ - ReactJS
37+ - TypeScript
38+ - NextJS 14 - App router and server actions
39+ - next-auth
40+ - Prisma ORM
41+ - Postgres
42+ - Turborepo
43+ - TailwindCSS
44+ - shadcn
45+ - next-themes
46+ - Zod validation
4747- React Form Hook
48- - Tsup
49- - EditorJs
50- - react-toastify
51- - react-textarea-autosize
52- - lucide-react icon
53- - dayjs
54- - Eslint
55- - Husky
48+ - Tsup
49+ - EditorJs
50+ - react-toastify
51+ - react-textarea-autosize
52+ - lucide-react icon
53+ - dayjs
54+ - Eslint
55+ - Husky
5656- Prettier
5757
5858# Functions
Original file line number Diff line number Diff line change @@ -47,8 +47,10 @@ export async function UserNav() {
4747 >
4848 < DropdownMenuLabel className = "font-normal" >
4949 < Link href = { `/author/${ session ?. user ?. id } ` } >
50- < div className = "flex flex-col justify-center rounded-sm p-2 hover:bg-muted hover:underline" >
51- < Typography className = "font-bold leading-none" > @{ session ?. user ?. name } </ Typography >
50+ < div className = "flex flex-col justify-center gap-2 rounded-sm p-2 hover:bg-muted hover:underline" >
51+ < Typography className = "font-bold leading-none" >
52+ @{ session ?. user ?. name || session ?. user ?. email . split ( "@" ) [ 0 ] }
53+ </ Typography >
5254 < Typography
5355 variant = "span"
5456 className = "text-xs leading-none text-muted-foreground"
@@ -78,24 +80,24 @@ export async function UserNav() {
7880 </ Link >
7981 < DropdownMenuShortcut > ⌘B</ DropdownMenuShortcut >
8082 </ DropdownMenuItem >
81- < DropdownMenuItem >
83+ { /* <DropdownMenuItem>
8284 <Link
8385 href="/user/settings"
8486 className="flex flex-1"
8587 >
8688 {t("common.setting")}
8789 </Link>
8890 <DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
89- </ DropdownMenuItem >
90- < DropdownMenuItem >
91+ </DropdownMenuItem> */ }
92+ { /* <DropdownMenuItem>
9193 <Link
9294 href="/user/password"
9395 className="flex flex-1"
9496 >
9597 {t("common.password")}
9698 </Link>
9799 <DropdownMenuShortcut>⌘P</DropdownMenuShortcut>
98- </ DropdownMenuItem >
100+ </DropdownMenuItem> */ }
99101 </ DropdownMenuGroup >
100102 < DropdownMenuSeparator />
101103 < LogoutMenu />
Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ const SIDE_BAR = [
99 label : "Posts" ,
1010 link : "/user/posts" ,
1111 } ,
12- {
13- label : "Password" ,
14- link : "/user/change-password" ,
15- } ,
16- {
17- label : "Setting" ,
18- link : "/user/settings" ,
19- } ,
12+ // {
13+ // label: "Password",
14+ // link: "/user/change-password",
15+ // },
16+ // {
17+ // label: "Setting",
18+ // link: "/user/settings",
19+ // },
2020] as Array < SidebarItemProps >
2121
2222export default async function ProtectedLayout ( { children } : { children : React . ReactNode } ) {
Original file line number Diff line number Diff line change 11import { NextRequest } from "next/server"
22
3+ import prisma from "database"
4+
35import { userSelect } from "@/types/users"
46
57export async function GET ( request : NextRequest , { params } : { params : { userId : string } } ) {
You can’t perform that action at this time.
0 commit comments