Skip to content

Commit 82cbd1b

Browse files
committed
migrate web
1 parent e54e876 commit 82cbd1b

File tree

30 files changed

+51
-51
lines changed

30 files changed

+51
-51
lines changed

web/api/chat/chat.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import type {
99
SharedRoom,
1010
UpdateRoom,
1111
UserID,
12-
} from "~/common/types";
12+
} from "common/types";
1313
import { ErrUnauthorized, credFetch } from "~/firebase/auth/lib";
1414
import endpoints from "../internal/endpoints";
1515

1616
/* TODO
17-
import { UserID } from "~/common/types";
18-
import type { User } from "~/common/types";
17+
import { UserID } from "common/types";
18+
import type { User } from "common/types";
1919
*/
2020

2121
//// DM グループチャット 共通////

web/api/chat/hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"use client";
22

3+
// import { useCallback, useEffect, useState } from "react";
4+
import type { Message, RoomOverview } from "common/types";
5+
import { MessageSchema, RoomOverviewSchema } from "common/zod/schemas";
36
import { useCallback } from "react";
47
import { z } from "zod";
5-
// import { useCallback, useEffect, useState } from "react";
6-
import type { Message, RoomOverview } from "~/common/types";
7-
import { MessageSchema, RoomOverviewSchema } from "~/common/zod/schemas";
88
import { type Hook, useCustomizedSWR } from "~/hooks/useCustomizedSWR";
99
import type { UserID } from "../internal/endpoints";
1010
// import type { Hook } from "~/share/types";

web/api/course.hook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { Course } from "common/types";
2+
import { CourseSchema } from "common/zod/schemas";
13
import { z } from "zod";
2-
import type { Course } from "~/common/types";
3-
import { CourseSchema } from "~/common/zod/schemas";
44
import { type Hook, useCustomizedSWR } from "~/hooks/useCustomizedSWR";
55
import { getMyCourses } from "./course";
66

web/api/course.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Course, CourseID, Day } from "~/common/types";
1+
import type { Course, CourseID, Day } from "common/types";
22
import { credFetch } from "~/firebase/auth/lib";
33
import endpoints from "./internal/endpoints";
44

web/api/internal/endpoints.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { CourseID, Day, GUID } from "~/common/types";
2-
import type { MessageID, ShareRoomID } from "~/common/types";
1+
import type { CourseID, Day, GUID } from "common/types";
2+
import type { MessageID, ShareRoomID } from "common/types";
33

44
export const origin: string | null = process.env.NEXT_PUBLIC_API_ENDPOINT ?? "";
55
if (!origin) throw new Error("process.env.NEXT_PUBLIC_API_ENDPOINT not found!");

web/api/internal/fetch-func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Err, Ok, type Result } from "~/common/lib/result";
1+
import { Err, Ok, type Result } from "common/lib/result";
22

33
export async function safeFetch(
44
path: string,

web/api/user.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { GUID, UpdateUser, User, UserID } from "common/types.ts";
2+
import { parseUser } from "common/zod/methods.ts";
3+
import { UserIDSchema, UserSchema } from "common/zod/schemas.ts";
14
import { z } from "zod";
2-
import type { GUID, UpdateUser, User, UserID } from "~/common/types.ts";
3-
import { parseUser } from "~/common/zod/methods.ts";
4-
import { UserIDSchema, UserSchema } from "~/common/zod/schemas.ts";
55
import { credFetch } from "~/firebase/auth/lib.ts";
66
import { type Hook, useCustomizedSWR } from "~/hooks/useCustomizedSWR.ts";
77
import { useAuthorizedData } from "~/hooks/useData.ts";

web/app/edit/profile/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import {
1212
Typography,
1313
} from "@mui/material";
1414
import type { SelectChangeEvent } from "@mui/material";
15+
import type { UpdateUser } from "common/types";
16+
import { UpdateUserSchema } from "common/zod/schemas";
1517
import { useRouter } from "next/navigation";
1618
import { enqueueSnackbar } from "notistack";
1719
import { useEffect, useState } from "react";
1820
import { update, useAboutMe } from "~/api/user";
1921
import { facultiesAndDepartments } from "~/app/signup/data";
20-
import type { UpdateUser } from "~/common/types";
21-
import { UpdateUserSchema } from "~/common/zod/schemas";
2222
import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress";
2323
import { useAlert } from "~/components/common/alert/AlertProvider";
2424
import PhotoModal from "~/components/config/PhotoModal";

web/app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"use client";
22

33
import { Box, Button, Link, Typography } from "@mui/material";
4+
import type { GUID } from "common/types";
45
import { GoogleAuthProvider, signInWithPopup } from "firebase/auth";
56
import { useRouter } from "next/navigation";
67
import { useSnackbar } from "notistack";
78
import * as user from "~/api/user";
89
import { getByGUID } from "~/api/user";
9-
import type { GUID } from "~/common/types";
1010
import Header from "~/components/Header";
1111
import { auth } from "~/firebase/config";
1212
import "./style.css";

web/app/signup/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import type { GUID, User } from "common/types";
2+
import type { UpdateUser } from "common/types";
13
import { getAuth } from "firebase/auth";
24
import type { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
35
import type { EnqueueSnackbar } from "notistack";
46
import * as userAPI from "~/api/user";
5-
import type { GUID, User } from "~/common/types";
6-
import type { UpdateUser } from "~/common/types";
77

88
type Dependencies = {
99
router: AppRouterInstance;

0 commit comments

Comments
 (0)