diff --git a/next.config.mjs b/next.config.mjs index d69ac54..3ba8b9a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,6 +12,14 @@ const nextConfig = { return config; }, + async rewrites() { + return [ + { + source: "/api/:path*", + destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`, + }, + ]; + }, }; export default nextConfig; diff --git a/public/fonts/Pretendard-Bold.ttf b/public/fonts/Pretendard-Bold.ttf deleted file mode 100644 index fb07fc6..0000000 Binary files a/public/fonts/Pretendard-Bold.ttf and /dev/null differ diff --git a/public/fonts/Pretendard-Medium.ttf b/public/fonts/Pretendard-Medium.ttf deleted file mode 100644 index 1db67c6..0000000 Binary files a/public/fonts/Pretendard-Medium.ttf and /dev/null differ diff --git a/public/fonts/Pretendard-Regular.ttf b/public/fonts/Pretendard-Regular.ttf deleted file mode 100644 index 01147e9..0000000 Binary files a/public/fonts/Pretendard-Regular.ttf and /dev/null differ diff --git a/src/api/client.ts b/src/api/client.ts index 1495e97..93b0da4 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -4,7 +4,8 @@ import Cookies from "js-cookie"; const apiUrl = process.env.NEXT_PUBLIC_API_URL; const apiClient = axios.create({ - baseURL: apiUrl, + // baseURL: apiUrl, + baseURL: "/api", headers: { "Content-Type": "application/json", }, diff --git a/src/api/endpoints.ts b/src/api/endpoints.ts index f1dc917..e913880 100644 --- a/src/api/endpoints.ts +++ b/src/api/endpoints.ts @@ -6,7 +6,7 @@ export const API_ENDPOINTS = { }, PROFESSOR: { CHECK: (professorId: string) => `/class/${professorId}/pod`, - CREATE: (professorId: string) => `/class/${professorId}/create`, + CREATE: (professorId: string) => `api/class/${professorId}/create`, DELETE: (professorId: string) => `/class/${professorId}/delete`, }, }; diff --git a/src/app/(main)/container/[id]/page.module.css b/src/app/(main)/container/[id]/page.module.css index 8c20d64..f78e27a 100644 --- a/src/app/(main)/container/[id]/page.module.css +++ b/src/app/(main)/container/[id]/page.module.css @@ -6,7 +6,6 @@ .headerTitle { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 10px 0; } diff --git a/src/app/(main)/help/page.module.css b/src/app/(main)/help/page.module.css index 36044ad..85e2017 100644 --- a/src/app/(main)/help/page.module.css +++ b/src/app/(main)/help/page.module.css @@ -3,7 +3,6 @@ } .headerTitle { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 10px 0; } diff --git a/src/app/(main)/layout.module.css b/src/app/(main)/layout.module.css index b5abd48..955248b 100644 --- a/src/app/(main)/layout.module.css +++ b/src/app/(main)/layout.module.css @@ -1,6 +1,6 @@ .layout { display: flex; - min-height: 100dvh; + min-height: 100vh; height: 100%; background-color: var(--gray-color); } @@ -28,7 +28,6 @@ .school { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; height: 80px; display: flex; @@ -47,54 +46,47 @@ display: flex; padding-bottom: 5px; gap: 5px; - font-family: "Pretendard-bold"; font-weight: 700; font-size: 20px; } -.studentsId { - font-family: "Pretendard-Regular"; - font-size: 16px; -} - +.studentsId, .studentId { - font-family: "Pretendard-Regular"; - font-size: 18px; + font-size: 16px; } .menu { padding: 50px 0 20px 0; display: flex; flex-direction: column; - gap: 30px; + gap: 20px; } .menuItem { display: flex; align-items: center; gap: 15px; - height: 60px; + height: 50px; padding: 10px; border-radius: 10px; - font-family: "Pretendard-bold"; + font-size: 18px; font-weight: 700; transition: color 0.3s ease, background-color 0.3s ease; } .menuText { - font-size: 20px; - font-family: "Pretendard-bold"; + font-size: 18px; font-weight: 700; } .subMenu { padding-left: 20px; - margin-top: -20px; + margin-top: -12px; + margin-bottom: -8px; } .subMenu div { - font-family: "Pretendard-Medium"; - font-size: 18px; + font-size: 16px; } .down { @@ -106,7 +98,6 @@ color: var(--white-color); text-decoration: none; font-size: 20px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -129,7 +120,7 @@ .left { background-color: var(--black-color); width: 100%; - height: 100dvh; + min-height: 100vh; transition: 0.15s ease; } @@ -139,8 +130,8 @@ align-items: center; padding: 50px 40px 0; font-size: 24px; - font-family: "Pretendard-Medium"; gap: 10px; + font-weight: 500; background-color: var(--black-color); } diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index b38d373..4627904 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -2,22 +2,20 @@ import { ReactNode, useEffect, useState } from "react"; import styles from "./layout.module.css"; -import { useAuthStore } from "@/store/authStore"; import Link from "next/link"; import { usePathname } from "next/navigation"; import Image from "next/image"; import LeftArrowIcon from "/public/icons/LeftArrow.svg"; import HamburgerIcon from "/public/icons/Hamburger.svg"; +import { useUserStore } from "@/store/userStore"; interface LayoutProps { children: ReactNode; } export default function Layout({ children }: LayoutProps) { - const user = useAuthStore((state) => state.user); - + const { name, role, studentId } = useUserStore((state) => state); const [isSidebarOpen, setSidebarOpen] = useState(true); - const navigation = usePathname(); const isActive = (path: string) => { @@ -67,10 +65,10 @@ export default function Layout({ children }: LayoutProps) { />
-
{user?.name}
-
{user?.isStudent ? "- 학생" : " - 교수"}
+
{name}
+
{role === "Student" ? "- 학생" : " - 교수"}
-
{user?.studentId}
+
{studentId}
@@ -78,15 +76,15 @@ export default function Layout({ children }: LayoutProps) { container
스페이스
container
@@ -126,8 +124,8 @@ export default function Layout({ children }: LayoutProps) { notice
공지
@@ -137,15 +135,15 @@ export default function Layout({ children }: LayoutProps) { community
메세지
- help + help
도움말
@@ -154,8 +152,8 @@ export default function Layout({ children }: LayoutProps) { mypage
마이페이지
@@ -176,8 +174,8 @@ export default function Layout({ children }: LayoutProps) { className={styles.iconButton} /> )} -
{user?.name}
-
/ {user?.studentId}
+
{name}
+
/ {studentId}
{ - const user = useAuthStore((state) => state.user); - const logout = useAuthStore((state) => state.logout); const router = useRouter(); + const { name, role, studentId, email, logout } = useUserStore( + (state) => state + ); const handleLogout = () => { logout(); @@ -25,29 +25,31 @@ const MyPage = () => {
-

{user?.name}

-

{user?.isStudent ? "학생" : "교수"}

-

{user?.studentId}

+

{name}

+

+ {role === "Student" ? "학생" : "교수"} +

+

{studentId}

내 정보

이름: - {user?.name} + {name}
역할: - {user?.isStudent ? "학생" : "교수"} + {role === "Student" ? "학생" : "교수"}
학번/교번: - {user?.studentId} + {studentId}
이메일: - {user?.email} + {email}
diff --git a/src/app/(main)/notice/[id]/page.module.css b/src/app/(main)/notice/[id]/page.module.css index fbd2227..c5c6b0e 100644 --- a/src/app/(main)/notice/[id]/page.module.css +++ b/src/app/(main)/notice/[id]/page.module.css @@ -11,7 +11,6 @@ .headerTitle { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 10px 0; } @@ -65,7 +64,6 @@ .noticeTitle { font-size: 20px; - font-family: "Pretendard-bold"; font-weight: 700; margin-bottom: 10px; } @@ -83,7 +81,6 @@ } .courseName { - font-family: "Pretendard-bold"; font-weight: 700; } diff --git a/src/app/(onboarding)/login/page.module.css b/src/app/(onboarding)/login/page.module.css index 493b81c..0222862 100644 --- a/src/app/(onboarding)/login/page.module.css +++ b/src/app/(onboarding)/login/page.module.css @@ -29,7 +29,6 @@ gap: 40px; align-items: center; font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--white-color); text-decoration: none; @@ -39,13 +38,12 @@ color: var(--lightgray-color); font-size: 18px; padding-top: 15px; - font-family: "Pretendard-bold"; + font-weight: 700; } .grayText2 { color: var(--lightgray-color); font-size: 16px; padding-top: 15px; - font-family: "Pretendard"; } .formContainer { @@ -92,7 +90,6 @@ color: var(--lightgray-color); font-size: 16px; text-align: right; - font-family: "Pretendard"; text-decoration: underline; cursor: pointer; } @@ -107,7 +104,6 @@ .textAlready { color: var(--lightgray-color); font-size: 16px; - font-family: "Pretendard"; } .loginLink { color: var(--orange-color); @@ -120,7 +116,6 @@ color: var(--white-color); border-radius: 10px; font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; margin-top: 30px; display: flex; @@ -162,7 +157,6 @@ color: var(--orange-color); border-radius: 10px; font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; display: flex; justify-content: center; diff --git a/src/app/(onboarding)/login/page.tsx b/src/app/(onboarding)/login/page.tsx index 32c2b3f..2d34ccc 100644 --- a/src/app/(onboarding)/login/page.tsx +++ b/src/app/(onboarding)/login/page.tsx @@ -22,6 +22,10 @@ export default function Login() { const handleSubmit = async (event: React.FormEvent) => { event.preventDefault(); + if (!email || !password) { + alert("Please fill out all fields."); + return; + } try { const { idToken, name, role, studentId } = await authenticateCognitoUser( email, @@ -60,46 +64,6 @@ export default function Login() { setErrorMessage(""); }; - // const handleSubmit = async (event: FormEvent) => { - // event.preventDefault(); - // try { - // const { idToken, name, role, studentId } = await authenticateCognitoUser( - // email, - // password - // ); - - // // Zustand 스토어에 로그인 정보 저장 - // login({ email, name, role, studentId, idToken }); - - // console.log("Access Token:", idToken); - // console.log("Name:", name); - // console.log("Role:", role); - // console.log("Student ID:", studentId); - - // // 사용자 역할에 따라 리디렉션 - // switch (role) { - // case "Student": - // router.push("/container/all"); - // break; - // case "Professor": - // router.push("/create-container"); - // break; - // default: - // router.push("/"); - // break; - // } - // } catch (err) { - // console.error("Login Error:", err); - // setError("Invalid password or need to verify email."); - // setShowModal(true); - // } - // }; - - // const closeModal = () => { - // setShowModal(false); - // setError(""); - // }; - return (
diff --git a/src/app/(onboarding)/onboarding/page.module.css b/src/app/(onboarding)/onboarding/page.module.css index cdb4fa8..ce7ad88 100644 --- a/src/app/(onboarding)/onboarding/page.module.css +++ b/src/app/(onboarding)/onboarding/page.module.css @@ -28,14 +28,13 @@ .headerText { font-size: 50px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--lightgray2-color); } .bodyText { margin-top: 100px; font-size: 20px; - font-family: "Pretendar-Medium"; + font-weight: 500; } .loginButton { margin-top: 60px; diff --git a/src/app/(onboarding)/signup/page.module.css b/src/app/(onboarding)/signup/page.module.css index 864184a..24f49e8 100644 --- a/src/app/(onboarding)/signup/page.module.css +++ b/src/app/(onboarding)/signup/page.module.css @@ -45,7 +45,6 @@ gap: 40px; align-items: center; font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -53,7 +52,6 @@ color: var(--lightgray-color); font-size: 18px; padding-top: 15px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -61,14 +59,13 @@ color: var(--lightgray-color); font-size: 16px; padding-top: 15px; - font-family: "Pretendard"; } .inputContainer { - padding-top: 20px; + padding-top: 15px; display: flex; flex-direction: column; - gap: 15px; + gap: 10px; width: 100%; } @@ -80,6 +77,15 @@ border-radius: 10px; border: 1px solid var(--lightgray-color); } +.inputSelect { + width: 100%; + height: 50px; + padding: 10px 0 10px 15px; + font-size: 16px; + border-radius: 10px; + border: 1px solid var(--lightgray-color); + outline: none; +} .inputBox { display: flex; @@ -106,13 +112,14 @@ color: var(--white-color); border-radius: 10px; font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; display: flex; justify-content: center; align-items: center; text-decoration: none; cursor: pointer; + border: none; + outline: none; } .linkContainer { @@ -127,7 +134,6 @@ .textAlready { color: var(--lightgray-color); font-size: 16px; - font-family: "Pretendard"; } .loginLink { diff --git a/src/app/(onboarding)/signup/page.tsx b/src/app/(onboarding)/signup/page.tsx index 12c7968..1515a41 100644 --- a/src/app/(onboarding)/signup/page.tsx +++ b/src/app/(onboarding)/signup/page.tsx @@ -22,6 +22,10 @@ export default function Signup() { const handleSignUp = (event: FormEvent): void => { event.preventDefault(); + if (!email || !password || !name || !role || !studentId) { + alert("Please fill out all fields."); + return; + } signUp({ email, password, @@ -76,24 +80,28 @@ export default function Signup() {
-
) => { event.preventDefault(); + if (!email || !code) { + alert("Please fill out all fields."); + return; + } try { await verifyEmail({ username: email, code }); router.push("/verify-email"); diff --git a/src/app/(professor)/check-container/page.module.css b/src/app/(professor)/check-container/page.module.css index 35b93ae..3fe7f64 100644 --- a/src/app/(professor)/check-container/page.module.css +++ b/src/app/(professor)/check-container/page.module.css @@ -4,8 +4,7 @@ .headerTitle { font-size: 24px; - font-family: "Pretendard-bold"; - font-weight: 700; + font-weight: 700; /* Bold style 적용 */ padding: 10px 0; } diff --git a/src/app/(professor)/create-container/page.module.css b/src/app/(professor)/create-container/page.module.css index 1f48f6d..ba4135b 100644 --- a/src/app/(professor)/create-container/page.module.css +++ b/src/app/(professor)/create-container/page.module.css @@ -17,14 +17,12 @@ .logoText { font-size: 30px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 50px 0 15px; } .grayText { color: var(--gray-color); font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -36,7 +34,6 @@ .title { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 10px 0; margin-bottom: 40px; @@ -56,7 +53,6 @@ .formGroup label { margin-bottom: 5px; font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--gray-color); } @@ -65,19 +61,16 @@ .formGroup select { padding: 8px; font-size: 14px; - font-family: "Pretendard-Medium"; + font-weight: 500; border: 1px solid #ccc; border-radius: 12px; } -.td { - font-family: "Pretendard-Medium"; -} .submitButton { margin-top: 30px; padding: 10px 15px; font-size: 16px; - font-family: "Pretendard-Medium"; + font-weight: 500; color: white; background-color: var(--orange-color); border: none; diff --git a/src/app/(professor)/edit-container/page.module.css b/src/app/(professor)/edit-container/page.module.css index e34be24..9f420d1 100644 --- a/src/app/(professor)/edit-container/page.module.css +++ b/src/app/(professor)/edit-container/page.module.css @@ -19,7 +19,6 @@ .logoText { font-size: 30px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 50px 0 15px; } @@ -27,7 +26,6 @@ .grayText { color: var(--gray-color); font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -39,7 +37,6 @@ .title { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; padding: 10px 0; margin-bottom: 40px; @@ -59,7 +56,6 @@ .formGroup label { margin-bottom: 5px; font-size: 16px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--gray-color); } diff --git a/src/app/(professor)/layout.module.css b/src/app/(professor)/layout.module.css index 8327a63..955248b 100644 --- a/src/app/(professor)/layout.module.css +++ b/src/app/(professor)/layout.module.css @@ -1,6 +1,6 @@ .layout { display: flex; - min-height: 100dvh; + min-height: 100vh; height: 100%; background-color: var(--gray-color); } @@ -28,7 +28,6 @@ .school { font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; height: 80px; display: flex; @@ -47,52 +46,47 @@ display: flex; padding-bottom: 5px; gap: 5px; - font-family: "Pretendard-bold"; font-weight: 700; font-size: 20px; } -.studentsId { - font-family: "Pretendard-Regular"; - font-size: 16px; -} - +.studentsId, .studentId { - font-family: "Pretendard-Regular"; - font-size: 18px; + font-size: 16px; } .menu { padding: 50px 0 20px 0; display: flex; flex-direction: column; - gap: 30px; + gap: 20px; } .menuItem { display: flex; align-items: center; gap: 15px; - height: 60px; + height: 50px; padding: 10px; border-radius: 10px; + font-size: 18px; + font-weight: 700; transition: color 0.3s ease, background-color 0.3s ease; } .menuText { - font-size: 20px; - font-family: "Pretendard-bold"; + font-size: 18px; font-weight: 700; } .subMenu { padding-left: 20px; - margin-top: -20px; + margin-top: -12px; + margin-bottom: -8px; } .subMenu div { - font-family: "Pretendard-Medium"; - font-size: 18px; + font-size: 16px; } .down { @@ -104,7 +98,6 @@ color: var(--white-color); text-decoration: none; font-size: 20px; - font-family: "Pretendard-bold"; font-weight: 700; } @@ -127,7 +120,7 @@ .left { background-color: var(--black-color); width: 100%; - height: 100dvh; + min-height: 100vh; transition: 0.15s ease; } @@ -137,8 +130,8 @@ align-items: center; padding: 50px 40px 0; font-size: 24px; - font-family: "Pretendard-Medium"; gap: 10px; + font-weight: 500; background-color: var(--black-color); } diff --git a/src/app/(professor)/layout.tsx b/src/app/(professor)/layout.tsx index cd2ab84..b233ed9 100644 --- a/src/app/(professor)/layout.tsx +++ b/src/app/(professor)/layout.tsx @@ -2,19 +2,19 @@ import { ReactNode, useEffect, useState } from "react"; import styles from "./layout.module.css"; -import { useAuthStore } from "@/store/authStore"; import Link from "next/link"; import { usePathname } from "next/navigation"; import Image from "next/image"; import LeftArrowIcon from "/public/icons/LeftArrow.svg"; import HamburgerIcon from "/public/icons/Hamburger.svg"; +import { useUserStore } from "@/store/userStore"; interface LayoutProps { children: ReactNode; } export default function Layout({ children }: LayoutProps) { - const user = useAuthStore((state) => state.user); + const { name, role, studentId } = useUserStore((state) => state); const [isSidebarOpen, setSidebarOpen] = useState(true); const navigation = usePathname(); @@ -66,10 +66,10 @@ export default function Layout({ children }: LayoutProps) { />
-
{user?.name}
-
{user?.isStudent ? "- 학생" : " - 교수"}
+
{name}
+
{role === "Student" ? "- 학생" : " - 교수"}
-
{user?.studentId}
+
{studentId}
@@ -162,8 +162,8 @@ export default function Layout({ children }: LayoutProps) { className={styles.iconButton} /> )} -
{user?.name}
-
/ {user?.studentId}
+
{name}
+
/ {studentId}
{ - const user = useAuthStore((state) => state.user); - const logout = useAuthStore((state) => state.logout); + const { name, role, studentId, email, logout } = useUserStore( + (state) => state + ); const router = useRouter(); const handleLogout = () => { @@ -24,29 +25,31 @@ const MyPage = () => {
-

{user?.name}

-

{user?.isStudent ? "학생" : "교수"}

-

{user?.studentId}

+

{name}

+

+ {role === "Student" ? "학생" : "교수"} +

+

{studentId}

내 정보

이름: - {user?.name} + {name}
역할: - {user?.isStudent ? "학생" : "교수"} + {role === "Student" ? "학생" : "교수"}
학번/교번: - {user?.studentId} + {studentId}
이메일: - {user?.email} + {email}
diff --git a/src/app/fonts/Pretendard-Bold.ttf b/src/app/fonts/Pretendard-Bold.ttf deleted file mode 100644 index fb07fc6..0000000 Binary files a/src/app/fonts/Pretendard-Bold.ttf and /dev/null differ diff --git a/src/app/fonts/Pretendard-Medium.ttf b/src/app/fonts/Pretendard-Medium.ttf deleted file mode 100644 index 1db67c6..0000000 Binary files a/src/app/fonts/Pretendard-Medium.ttf and /dev/null differ diff --git a/src/app/fonts/Pretendard-Regular.ttf b/src/app/fonts/Pretendard-Regular.ttf deleted file mode 100644 index 01147e9..0000000 Binary files a/src/app/fonts/Pretendard-Regular.ttf and /dev/null differ diff --git a/src/app/globals.css b/src/app/globals.css index d20fdba..90383a6 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,9 +1,6 @@ :root { --max-width: 1100px; --border-radius: 12px; - /* --font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", - "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", - "Fira Mono", "Droid Sans Mono", "Courier New", monospace; */ /* 색상 지정 */ --gray-color: #2d2d2d; @@ -17,20 +14,6 @@ --orange50-color: rgba(253, 116, 1, 0.7); } -@font-face { - font-family: "Pretendard"; - font-weight: 400; - font-style: normal; - src: url("/fonts/Pretendard-Medium.ttf") format("ttf"); -} - -@font-face { - font-family: "Pretendard"; - font-weight: 700; - font-style: normal; - src: url("/fonts/Pretendard-Bold.ttf") format("ttf"); -} - * { box-sizing: border-box; padding: 0; @@ -41,7 +24,7 @@ html, body { max-width: 100vw; overflow-x: hidden; - font-family: "Pretendard", sans-serif; + font-family: var(--font-pretendard); color: var(--white-color); background-color: var(--gray-color); } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c4f3f2f..f04a8cc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,7 @@ import React from "react"; +import "./globals.css"; import type { Metadata } from "next"; import localFont from "next/font/local"; -import "./globals.css"; import Providers from "@/utils/provider"; export const metadata: Metadata = { @@ -19,21 +19,11 @@ export const metadata: Metadata = { ], }; -const pretendardBold = localFont({ - src: "./fonts/Pretendard-Bold.ttf", - display: "swap", - weight: "700", -}); - -const pretendardMedium = localFont({ - src: "./fonts/Pretendard-Medium.ttf", - display: "swap", - weight: "300", -}); const pretendard = localFont({ - src: "./fonts/Pretendard-Regular.ttf", + src: "../fonts/PretendardVariable.woff2", display: "swap", - weight: "300", + weight: "45 920", + variable: "--font-pretendard", }); export default function RootLayout({ @@ -43,9 +33,7 @@ export default function RootLayout({ }>) { return ( - + {children} diff --git a/src/components/common/WarningModal.module.css b/src/components/common/WarningModal.module.css index 7734871..113e779 100644 --- a/src/components/common/WarningModal.module.css +++ b/src/components/common/WarningModal.module.css @@ -25,7 +25,6 @@ align-items: center; text-align: center; font-size: 20px; - font-family: "pretendard-bold"; font-weight: 700; } diff --git a/src/components/container/Container.module.css b/src/components/container/Container.module.css index dd6cb9e..fb54980 100644 --- a/src/components/container/Container.module.css +++ b/src/components/container/Container.module.css @@ -34,7 +34,6 @@ display: flex; flex-direction: row; gap: 5px; - font-family: "Pretendard-bold"; font-weight: 700; } .bottomDescription { diff --git a/src/components/container/SSHModal.module.css b/src/components/container/SSHModal.module.css index 9f0433d..1e76015 100644 --- a/src/components/container/SSHModal.module.css +++ b/src/components/container/SSHModal.module.css @@ -27,7 +27,6 @@ .header { text-align: center; font-size: 24px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--gray-color); } @@ -36,7 +35,6 @@ display: flex; flex-direction: column; gap: 5px; - font-family: "Pretendard-bold"; font-weight: 700; color: var(--gray-color); } diff --git a/src/components/notice/NoticeItem.module.css b/src/components/notice/NoticeItem.module.css index 0a5f4ef..5c65d0f 100644 --- a/src/components/notice/NoticeItem.module.css +++ b/src/components/notice/NoticeItem.module.css @@ -5,14 +5,12 @@ } .noticeTitle { - font-family: "Pretendard-bold"; font-weight: 700; margin-bottom: 10px; } .noticeHeader { font-size: 20px; - font-family: "Pretendard-bold"; font-weight: 700; padding-bottom: 20px; } @@ -32,7 +30,6 @@ } .courseName { - font-family: "Pretendard-bold"; font-weight: 700; color: var(--orange-color); } diff --git a/src/components/onboarding/TopNavBar.module.css b/src/components/onboarding/TopNavBar.module.css index 23ffce2..9f00484 100644 --- a/src/components/onboarding/TopNavBar.module.css +++ b/src/components/onboarding/TopNavBar.module.css @@ -16,7 +16,7 @@ .logoText { font-size: 18px; text-decoration: none; - font-family: "Pretendard-Medium"; + font-weight: 500; color: var(--white-color); } diff --git a/src/fonts/PretendardVariable.woff2 b/src/fonts/PretendardVariable.woff2 new file mode 100644 index 0000000..49c54b5 Binary files /dev/null and b/src/fonts/PretendardVariable.woff2 differ diff --git a/src/store/authStore.tsx b/src/store/authStore.tsx deleted file mode 100644 index 95be85d..0000000 --- a/src/store/authStore.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { create } from "zustand"; -import { createJSONStorage, persist } from "zustand/middleware"; - -// 유저 정보 추가 -interface User { - name: string; - studentId: string; - email: string; - isStudent: boolean; -} - -interface AuthState { - user: User | null; - isLoggedIn: boolean; - isLoading: boolean; - login: (user: User) => void; - logout: () => void; - setLoading: (loading: boolean) => void; -} - -const userDummyStudent = { - name: "김태건", - studentId: "2019312430", - email: "aksen5240@gmail.com", - isStudent: true, -}; - -const userDummyProfessor = { - name: "교수자1", - studentId: "1999312430", - email: "aksen5240@gmail.com", - isStudent: false, -}; - -export const useAuthStore = create()( - persist( - (set) => ({ - user: null, - isLoggedIn: false, - isLoading: true, - login: (user: User) => { - set({ user: user, isLoggedIn: true, isLoading: false }); - sessionStorage.setItem("isLoggedIn", "true"); - }, - logout: () => { - set({ user: null, isLoggedIn: false, isLoading: false }); - sessionStorage.removeItem("isLoggedIn"); - }, - setLoading: (loading: boolean) => set({ isLoading: loading }), - }), - { - name: "authStore", - storage: createJSONStorage(() => sessionStorage), - onRehydrateStorage: () => (state) => { - state?.setLoading(false); - }, - } - ) -); - -export const authenticateUser = (email: string, password: string) => { - if (email === "student" && password === "123") { - return userDummyStudent; - } else if (email === "professor" && password === "123") { - return userDummyProfessor; - } else { - return null; - } -};