Skip to content

Commit 39eb774

Browse files
committed
feat: update minor issue
1 parent 0afeb0f commit 39eb774

File tree

4 files changed

+37
-33
lines changed

4 files changed

+37
-33
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff 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

apps/web/@/molecules/user-nav/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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 />

apps/web/app/[lang]/(protected)/layout.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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

2222
export default async function ProtectedLayout({ children }: { children: React.ReactNode }) {

apps/web/app/api/protected/user/[userId]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { NextRequest } from "next/server"
22

3+
import prisma from "database"
4+
35
import { userSelect } from "@/types/users"
46

57
export async function GET(request: NextRequest, { params }: { params: { userId: string } }) {

0 commit comments

Comments
 (0)