Skip to content

Commit bbaccce

Browse files
committed
feat(user): add user setting page
1 parent 5f87c27 commit bbaccce

File tree

19 files changed

+607
-10
lines changed

19 files changed

+607
-10
lines changed

src/app/(default)/u/[username]/layout.tsx src/app/(default)/u/[username]/(default)/layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function UserLayout(props: { children: React.ReactNode, params: P
6767
<p>Sorry, the page you visited does not exist.</p>
6868
</div>
6969
<div className="not-found-start">
70-
<Link href="/">Go Home</Link>
70+
<Link href="/public">Go Home</Link>
7171
</div>
7272
</div>
7373
</div>

src/app/(default)/u/[username]/(setting)/setting/layout.tsx

-7
This file was deleted.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function Setting2Fa() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingAccount() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingAppearance() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingBilling() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use client'
2+
3+
import {UserSettingSidebar} from "@/component/user/usersettingsidebar";
4+
import React, {useState} from "react";
5+
import {useRouter} from "next/navigation";
6+
import useUserContext from "@/store/useUserContext";
7+
8+
export default function UserSettingLayout(props: { children: React.ReactNode }) {
9+
const [Tab, setTab] = useState<string>("profile");
10+
const nav = useRouter().replace;
11+
const user = useUserContext();
12+
const dash = user.getDashBored();
13+
const setTabs = (tab: string) => {
14+
setTab(tab);
15+
nav(`/u/setting/${tab}`);
16+
}
17+
return (
18+
<div className="user-setting">
19+
{
20+
dash ? (
21+
<>
22+
<UserSettingSidebar tab={Tab} setTab={setTabs} dash={dash}/>
23+
<div className="user-setting-body">
24+
{props.children}
25+
</div>
26+
</>
27+
):(
28+
<>
29+
Please Login
30+
</>
31+
)
32+
}
33+
34+
</div>
35+
);
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingNotifications() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}

src/app/(default)/u/setting/page.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function UserSettingPage() {
2+
return(
3+
<>
4+
5+
</>
6+
)
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingPassword() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default function SettingPayment() {
2+
return(
3+
<>
4+
</>
5+
)
6+
}

0 commit comments

Comments
 (0)