diff --git a/server/src/router/users.ts b/server/src/router/users.ts
index 771c9fca..ece37091 100644
--- a/server/src/router/users.ts
+++ b/server/src/router/users.ts
@@ -7,6 +7,7 @@ import {
} from "common/zod/schemas";
import { Hono } from "hono";
import { z } from "zod";
+import { prisma } from "../database/client";
import {
getPendingRequestsFromUser,
getPendingRequestsToUser,
@@ -51,9 +52,17 @@ const router = new Hono()
// ユーザーの存在を確認するためのエンドポイント。だれでもアクセス可能
.get("/exists/:guid", param({ guid: z.string() }), async (c) => {
const guid = c.req.valid("param").guid;
- const ok = await core.userExists(guid as GUID);
- c.status(ok.code);
- return c.json({});
+ const user = await prisma.user.findFirst({
+ where: {
+ guid: guid,
+ },
+ select: { guid: true, name: true },
+ });
+ if (!user) {
+ return c.json({ message: "User not found" }, 404);
+ }
+
+ return c.json(200);
})
// 特定のユーザーとマッチしたユーザーを取得
diff --git a/web/app/chat/layout.tsx b/web/app/chat/layout.tsx
index a2c62fd9..fabe653b 100644
--- a/web/app/chat/layout.tsx
+++ b/web/app/chat/layout.tsx
@@ -1,19 +1,18 @@
import BottomBar from "~/components/BottomBar";
import Header from "~/components/Header";
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
+import { ModalProvider } from "~/components/common/modal/ModalProvider";
-export default function Layout({
- children,
-}: {
- children: React.ReactNode;
-}) {
+export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
-
-
- {children}
-
-
+
+
+
+ {children}
+
+
+
>
);
}
diff --git a/web/app/friends/layout.tsx b/web/app/friends/layout.tsx
index b5295993..0146483c 100644
--- a/web/app/friends/layout.tsx
+++ b/web/app/friends/layout.tsx
@@ -1,19 +1,18 @@
import BottomBar from "~/components/BottomBar";
import Header from "~/components/Header";
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
+import { ModalProvider } from "~/components/common/modal/ModalProvider";
-export default function Layout({
- children,
-}: {
- children: React.ReactNode;
-}) {
+export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
-
-
- {children}
-
-
+
+
+
+ {children}
+
+
+
>
);
}
diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index 254ffcf8..17a6a4bd 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -10,8 +10,6 @@ import "@fontsource/roboto/500.css";
import "@fontsource/roboto/700.css";
import BanLandscape from "~/components/BanLandscape";
import { AlertProvider } from "~/components/common/alert/AlertProvider";
-import { ModalProvider } from "~/components/common/modal/ModalProvider";
-import AuthProvider from "~/firebase/auth/AuthProvider";
const theme = createTheme({
palette: {
@@ -45,15 +43,13 @@ export default function RootLayout({
anchorOrigin={{ horizontal: "right", vertical: "top" }}
>
-
-
-
-
-
- {children}
-
-
-
+
+
+ {/* */}
+
+ {children}
+ {/* */}
+
diff --git a/web/app/search/layout.tsx b/web/app/search/layout.tsx
index 3f75b04d..87bbc6a3 100644
--- a/web/app/search/layout.tsx
+++ b/web/app/search/layout.tsx
@@ -1,19 +1,18 @@
import BottomBar from "~/components/BottomBar";
import Header from "~/components/Header";
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
+import { ModalProvider } from "~/components/common/modal/ModalProvider";
-export default function Layout({
- children,
-}: {
- children: React.ReactNode;
-}) {
+export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
-
-
- {children}
-
-
+
+
+
+ {children}
+
+
+
>
);
}
diff --git a/web/components/common/modal/ModalProvider.tsx b/web/components/common/modal/ModalProvider.tsx
index 99fe463c..7ac0e775 100644
--- a/web/components/common/modal/ModalProvider.tsx
+++ b/web/components/common/modal/ModalProvider.tsx
@@ -1,3 +1,4 @@
+"use client";
import type { UserWithCoursesAndSubjects } from "common/types";
import { type ReactNode, createContext, useContext, useState } from "react";
import { useAboutMe } from "~/api/user";