Skip to content

Commit c48eb85

Browse files
committed
cm-li-btn を作成
1 parent f75b859 commit c48eb85

File tree

3 files changed

+61
-52
lines changed

3 files changed

+61
-52
lines changed

web/app/globals.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
max-width: 450px;
88
max-height: 450px;
99
}
10+
11+
.cm-li-btn {
12+
@apply no-animation w-full justify-start rounded-none border-none bg-white px-4 py-2 text-left font-normal text-base hover:bg-zinc-100 focus:bg-zinc-300;
13+
}

web/app/settings/page.tsx

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,60 @@
1-
import {
2-
Box,
3-
Divider,
4-
List,
5-
ListItemButton,
6-
ListItemText,
7-
} from "@mui/material";
81
import Link from "next/link";
92
import LogOutButton from "~/components/LogOutButton";
103
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
114

125
export default function Settings() {
136
return (
147
<NavigateByAuthState type="toLoginForUnauthenticated">
15-
<Box
16-
sx={{
17-
display: "flex",
18-
flexDirection: "column",
19-
alignItems: "center",
20-
justifyContent: "flex-start",
21-
}}
22-
>
23-
<List sx={{ width: "100%" }}>
24-
<ListItemButton LinkComponent={Link} href="/settings/profile">
25-
<ListItemText primary="あなたのカード" />
26-
</ListItemButton>
27-
<Divider />
28-
<ListItemButton LinkComponent={Link} href="/tutorial">
29-
<ListItemText primary="CourseMateの使い方" />
30-
</ListItemButton>
31-
<Divider />
32-
<ListItemButton LinkComponent={Link} href="/settings/contact">
33-
<ListItemText primary="お問い合わせ" />
34-
</ListItemButton>
35-
<Divider />
36-
<ListItemButton LinkComponent={Link} href="/faq">
37-
<ListItemText primary="よくある質問" />
38-
</ListItemButton>
39-
<Divider />
40-
<ListItemButton LinkComponent={Link} href="/settings/aboutUs">
41-
<ListItemText primary="About Us" />
42-
</ListItemButton>
43-
<Divider />
44-
<ListItemButton LinkComponent={Link} href="/settings/disclaimer">
45-
<ListItemText primary="免責事項" />
46-
</ListItemButton>
47-
<Divider />
48-
<ListItemButton LinkComponent={Link} href="/settings/delete">
49-
<ListItemText primary="アカウント削除" />
50-
</ListItemButton>
51-
<Divider />
52-
<LogOutButton />
53-
<Divider />
54-
</List>
55-
</Box>
8+
<div className="flex flex-col items-center justify-start">
9+
<ul className="w-full">
10+
<li>
11+
<Link href="/settings/profile" className="btn cm-li-btn">
12+
あなたのカード
13+
</Link>
14+
</li>
15+
<hr />
16+
<li>
17+
<Link href="/tutorial" className="btn cm-li-btn">
18+
CourseMateの使い方
19+
</Link>
20+
</li>
21+
<hr />
22+
<li>
23+
<Link href="/settings/contact" className="btn cm-li-btn">
24+
お問い合わせ
25+
</Link>
26+
</li>
27+
<hr />
28+
<li>
29+
<Link href="/faq" className="btn cm-li-btn">
30+
よくある質問
31+
</Link>
32+
</li>
33+
<hr />
34+
<li>
35+
<Link href="/settings/aboutUs" className="btn cm-li-btn">
36+
About Us
37+
</Link>
38+
</li>
39+
<hr />
40+
<li>
41+
<Link href="/settings/disclaimer" className="btn cm-li-btn">
42+
免責事項
43+
</Link>
44+
</li>
45+
<hr />
46+
<li>
47+
<Link href="/settings/delete" className="btn cm-li-btn">
48+
アカウント削除
49+
</Link>
50+
</li>
51+
<hr />
52+
<li>
53+
<LogOutButton />
54+
</li>
55+
<hr />
56+
</ul>
57+
</div>
5658
</NavigateByAuthState>
5759
);
5860
}

web/components/LogOutButton.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use client";
22

3-
import { ListItemButton, ListItemText } from "@mui/material";
43
import { signOut } from "firebase/auth";
54
import { useRouter } from "next/navigation";
65
import { useSnackbar } from "notistack";
@@ -36,8 +35,12 @@ export default function LogOutButton() {
3635
}, [showAlert, signOutUser]);
3736

3837
return (
39-
<ListItemButton onClick={onClick}>
40-
<ListItemText primary="ログアウト" sx={{ color: "indianred" }} />
41-
</ListItemButton>
38+
<button
39+
type="button"
40+
onClick={onClick}
41+
className="btn cm-li-btn text-[#cd5c5c]"
42+
>
43+
ログアウト
44+
</button>
4245
);
4346
}

0 commit comments

Comments
 (0)