diff --git a/web/app/chat/components/RoomList.tsx b/web/app/chat/components/RoomList.tsx index 03635e5f..a43ac412 100644 --- a/web/app/chat/components/RoomList.tsx +++ b/web/app/chat/components/RoomList.tsx @@ -3,6 +3,7 @@ import { Box, List, Typography } from "@mui/material"; import type { RoomOverview } from "common/types"; import { useRouter, useSearchParams } from "next/navigation"; +import BackgroundText from "~/components/common/BackgroundText"; import { HumanListItem } from "~/components/human/humanListItem"; import RoomPage from "./RoomPage"; @@ -23,93 +24,85 @@ export function RoomList(props: RoomListProps) { return ( <> {!friendId ? ( - -

- {roomsData && roomsData.length === 0 && ( - <> - 誰ともマッチングしていません。 -
- リクエストを送りましょう! - - )} -

- {roomsData?.map((room) => { - if (room.isDM) { - if (room.matchingStatus === "otherRequest") { - return ( - { - e.stopPropagation(); - openRoom(room); - }} - > - + {roomsData && roomsData.length === 0 ? ( + + ) : ( + + {roomsData?.map((room) => { + if (room.isDM) { + if (room.matchingStatus === "otherRequest") { + return ( + { + e.stopPropagation(); + openRoom(room); + }} + > + + + ); + } + if (room.matchingStatus === "myRequest") { + return ( + { + e.stopPropagation(); + openRoom(room); + }} + > + + + ); + } + return ( + - - ); - } - if (room.matchingStatus === "myRequest") { + onClick={() => { + openRoom(room); + }} + > + + + ); + } return ( - { - e.stopPropagation(); - openRoom(room); - }} - > - - + + グループチャット: {room.name} + ); - } - return ( - { - openRoom(room); - }} - > - - - ); - } - return ( - - グループチャット: {room.name} - - ); - })} -
+ })} + + )} + ) : ( )} diff --git a/web/app/friends/page.tsx b/web/app/friends/page.tsx index ce2a859e..219d8f60 100644 --- a/web/app/friends/page.tsx +++ b/web/app/friends/page.tsx @@ -15,7 +15,7 @@ export default function Friends() { const [activeTab, setActiveTab] = useState("matching"); return ( -
+
-
+
{activeTab === "matching" ? : }
diff --git a/web/app/home/components/NoMoreUser.tsx b/web/app/home/components/NoMoreUser.tsx deleted file mode 100644 index 91b7aa02..00000000 --- a/web/app/home/components/NoMoreUser.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function NoMoreUser() { - return ( -
-

- 「いいね!」を送るユーザーがいません。 -

-
- ); -} diff --git a/web/app/home/page.tsx b/web/app/home/page.tsx index da45ff4b..1e747856 100644 --- a/web/app/home/page.tsx +++ b/web/app/home/page.tsx @@ -15,7 +15,7 @@ import { useAboutMe, useRecommended } from "~/api/user"; import { Card } from "~/components/Card"; import { DraggableCard } from "~/components/DraggableCard"; import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress"; -import NoMoreUser from "./components/NoMoreUser"; +import BackgroundText from "../../components/common/BackgroundText"; import PersonDetailedMenu from "./components/PersonDetailedMenu"; import RoundButton from "./components/RoundButton"; @@ -121,7 +121,7 @@ export default function Home() { return ; } if (recommended.size() === 0 && loading === false) { - return ; + return ; } if (error) throw error; diff --git a/web/app/search/page.tsx b/web/app/search/page.tsx index f1114915..27c7a368 100644 --- a/web/app/search/page.tsx +++ b/web/app/search/page.tsx @@ -6,6 +6,7 @@ import { useAll, useMatched, useMyID, usePendingFromMe } from "~/api/user"; import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress"; import Search from "~/components/search/search"; import Table from "~/components/search/table"; +import BackgroundText from "../../components/common/BackgroundText"; export default function SearchPage({ searchParams, @@ -54,14 +55,17 @@ export default function SearchPage({ ); return ( -
-
-

ユーザー検索

- - {users ? ( - +
+ +
+ {query !== "" ? ( + users.length > 0 ? ( +
+ ) : ( + + ) ) : ( - ユーザーが見つかりません + )} diff --git a/web/components/common/BackgroundText.tsx b/web/components/common/BackgroundText.tsx new file mode 100644 index 00000000..069e09aa --- /dev/null +++ b/web/components/common/BackgroundText.tsx @@ -0,0 +1,7 @@ +export default function BackgroundText({ text }: { text: string }) { + return ( +
+

{text}

+
+ ); +} diff --git a/web/components/match/matching.tsx b/web/components/match/matching.tsx index f1348150..01a8a647 100644 --- a/web/components/match/matching.tsx +++ b/web/components/match/matching.tsx @@ -1,6 +1,7 @@ "use client"; import { deleteMatch } from "~/api/match"; import { useMatched } from "~/api/user"; +import BackgroundText from "../common/BackgroundText"; import FullScreenCircularProgress from "../common/FullScreenCircularProgress"; import { useModal } from "../common/modal/ModalProvider"; import { HumanListItem } from "../human/humanListItem"; @@ -15,16 +16,14 @@ export default function Matchings() { if (error) throw error; return ( -
+
{data && data.length === 0 && ( -

- 誰ともマッチングしていません。 リクエストを送りましょう! -

+ )} {current === "loading" ? ( ) : ( -
    +
      {data?.map((matchedUser) => matchedUser.id === 0 ? ( //メモ帳 diff --git a/web/components/search/search.tsx b/web/components/search/search.tsx index e826aa5c..740ad6d5 100644 --- a/web/components/search/search.tsx +++ b/web/components/search/search.tsx @@ -21,19 +21,17 @@ export default function Search({ placeholder, setSearchString }: Props) { } return ( -
      - +
      + ); }