Skip to content

Commit ba3cd01

Browse files
committed
リクエストタブのdaisyUI移行を完了
1 parent c3bedae commit ba3cd01

File tree

2 files changed

+37
-40
lines changed

2 files changed

+37
-40
lines changed
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Box } from "@mui/material";
2-
import { List } from "@mui/material";
31
import * as request from "~/api/request";
42
import { usePendingFromMe } from "~/api/user";
53
import FullScreenCircularProgress from "../common/FullScreenCircularProgress";
@@ -11,36 +9,36 @@ export default function MyReq() {
119
const { openModal } = useModal();
1210

1311
return (
14-
<Box>
15-
<p
16-
style={{
17-
marginLeft: "40px",
18-
}}
19-
>
12+
<div className="p-4">
13+
<p className="ml-10 text-lg">
2014
{state.data && state.data.length > 0
2115
? "以下のリクエストを送信しました!"
2216
: "リクエストを送信しましょう!"}
2317
</p>
2418
{state.current === "loading" ? (
2519
<FullScreenCircularProgress />
2620
) : state.error ? (
27-
<p>Error: {state.error.message}</p>
21+
<p className="text-red-500">Error: {state.error.message}</p>
2822
) : (
29-
<List>
23+
<ul className="mt-4 space-y-4">
3024
{state.data?.map((receivingUser) => (
31-
<HumanListItem
25+
<li
3226
key={receivingUser.id}
33-
id={receivingUser.id}
34-
name={receivingUser.name}
35-
pictureUrl={receivingUser.pictureUrl}
36-
onOpen={() => openModal(receivingUser)}
37-
onCancel={(id) => {
38-
request.cancel(id).then(reload);
39-
}}
40-
/>
27+
className="rounded-lg bg-base-100 p-4 shadow"
28+
>
29+
<HumanListItem
30+
id={receivingUser.id}
31+
name={receivingUser.name}
32+
pictureUrl={receivingUser.pictureUrl}
33+
onOpen={() => openModal(receivingUser)}
34+
onCancel={(id) => {
35+
request.cancel(id).then(reload);
36+
}}
37+
/>
38+
</li>
4139
))}
42-
</List>
40+
</ul>
4341
)}
44-
</Box>
42+
</div>
4543
);
4644
}
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Box, List } from "@mui/material";
21
import request from "~/api/request";
32
import { usePendingToMe } from "~/api/user";
43
import FullScreenCircularProgress from "../common/FullScreenCircularProgress";
@@ -14,35 +13,35 @@ export default function OthersReq() {
1413
const { openModal } = useModal();
1514

1615
return (
17-
<Box>
18-
<p
19-
style={{
20-
marginLeft: "40px",
21-
}}
22-
>
16+
<div className="p-4">
17+
<p className="ml-10 text-lg">
2318
{data && data.length > 0
2419
? "以下のリクエストを受け取りました!"
2520
: "リクエストは受け取っていません。"}
2621
</p>
2722
{loading ? (
2823
<FullScreenCircularProgress />
2924
) : error ? (
30-
<p>Error: {error.message}</p>
25+
<p className="text-red-500">Error: {error.message}</p>
3126
) : (
32-
<List>
27+
<ul className="mt-4 space-y-4">
3328
{data?.map((sendingUser) => (
34-
<HumanListItem
29+
<li
3530
key={sendingUser.id}
36-
id={sendingUser.id}
37-
name={sendingUser.name}
38-
pictureUrl={sendingUser.pictureUrl}
39-
onOpen={() => openModal(sendingUser)}
40-
onAccept={() => request.accept(sendingUser.id).then(reload)}
41-
onReject={() => request.reject(sendingUser.id).then(reload)}
42-
/>
31+
className="rounded-lg bg-base-100 p-4 shadow"
32+
>
33+
<HumanListItem
34+
id={sendingUser.id}
35+
name={sendingUser.name}
36+
pictureUrl={sendingUser.pictureUrl}
37+
onOpen={() => openModal(sendingUser)}
38+
onAccept={() => request.accept(sendingUser.id).then(reload)}
39+
onReject={() => request.reject(sendingUser.id).then(reload)}
40+
/>
41+
</li>
4342
))}
44-
</List>
43+
</ul>
4544
)}
46-
</Box>
45+
</div>
4746
);
4847
}

0 commit comments

Comments
 (0)