From 295ab9c1b42d176251b6eb28218ad1d69630ebd1 Mon Sep 17 00:00:00 2001 From: naka-12 <104970808+naka-12@users.noreply.github.com> Date: Wed, 16 Apr 2025 00:27:47 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E6=A4=9C?= =?UTF-8?q?=E7=B4=A2=E3=81=A7=201=20=E6=96=87=E5=AD=97=E4=BB=A5=E4=B8=8A?= =?UTF-8?q?=E5=85=A5=E5=8A=9B=E3=81=97=E3=81=9F=E3=82=89=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/home/components/NoMoreUser.tsx | 9 --------- web/app/home/page.tsx | 4 ++-- web/app/search/page.tsx | 11 ++++++++--- web/components/common/BackgroundText.tsx | 7 +++++++ 4 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 web/app/home/components/NoMoreUser.tsx create mode 100644 web/components/common/BackgroundText.tsx 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..ab7cfe47 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, @@ -58,10 +59,14 @@ export default function SearchPage({

ユーザー検索

- {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}

+
+ ); +} From a1418aa0206dfece6c16e540d8a12858d0e8622f Mon Sep 17 00:00:00 2001 From: naka-12 <104970808+naka-12@users.noreply.github.com> Date: Wed, 16 Apr 2025 00:38:34 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E6=A4=9C?= =?UTF-8?q?=E7=B4=A2=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/search/page.tsx | 7 +++---- web/components/search/search.tsx | 12 +++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/web/app/search/page.tsx b/web/app/search/page.tsx index ab7cfe47..27c7a368 100644 --- a/web/app/search/page.tsx +++ b/web/app/search/page.tsx @@ -55,10 +55,9 @@ export default function SearchPage({ ); return ( -
-
-

ユーザー検索

- +
+ +
{query !== "" ? ( users.length > 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 ( -
- +
+ ); } From f03947c2e391ed865410077431b737d45737938f Mon Sep 17 00:00:00 2001 From: naka-12 <104970808+naka-12@users.noreply.github.com> Date: Wed, 16 Apr 2025 00:47:04 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=9E=E3=83=83=E3=83=81=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=81=AE=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=82=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/friends/page.tsx | 4 ++-- web/components/match/matching.tsx | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) 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/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 ? ( //メモ帳 From 6cd9401b9b6c05a64611597e14be9f468d6d8518 Mon Sep 17 00:00:00 2001 From: naka-12 <104970808+naka-12@users.noreply.github.com> Date: Wed, 16 Apr 2025 00:57:32 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=82=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/chat/components/RoomList.tsx | 161 +++++++++++++-------------- 1 file changed, 77 insertions(+), 84 deletions(-) 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} - - ); - })} -
      + })} + + )} + ) : ( )}