From adc225851ed0a220f68423fc11f66af712a6196e Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:32:42 +0900 Subject: [PATCH 01/20] feat: add middleware --- src/middleware.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/middleware.ts diff --git a/src/middleware.ts b/src/middleware.ts new file mode 100644 index 0000000..41d79af --- /dev/null +++ b/src/middleware.ts @@ -0,0 +1,16 @@ +import { NextResponse } from "next/server"; +import type { NextRequest } from "next/server"; + +export function middleware(request: NextRequest) { + const refreshToken = request.cookies.get("refresh_token"); + + if (refreshToken) { + return NextResponse.redirect(new URL("/dashboard", request.url)); + } + + return NextResponse.next(); +} + +export const config = { + matcher: ["/", "/login"], +}; From 011581a0a0495f28025f86735765025ce9174325 Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:32:56 +0900 Subject: [PATCH 02/20] =?UTF-8?q?feat:=20metadata=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 5c9d199..f23a7f3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,8 +3,9 @@ import "./globals.css"; import ClientProvider from "./clientProvider"; export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Jobnote", + description: + "지원 현황, 면접 일정, 문서 버전 관리까지 한 번에 — Jobnote로 효율적인 취업 준비를 시작하세요.", }; export default function RootLayout({ @@ -15,7 +16,7 @@ export default function RootLayout({ modal: React.ReactNode; }>) { return ( - + {children} From b7700b4e34db9561482babec8ed515c186f4348c Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:33:10 +0900 Subject: [PATCH 03/20] =?UTF-8?q?chore:=20spinner=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(afterLogin)/layout.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/(afterLogin)/layout.tsx b/src/app/(afterLogin)/layout.tsx index 01019b9..9b20727 100644 --- a/src/app/(afterLogin)/layout.tsx +++ b/src/app/(afterLogin)/layout.tsx @@ -6,7 +6,6 @@ import InfoChangeModal from "./_components/infoChangeScreen/infoChangeModal"; import PageTitle from "./_components/pageTitle"; import SideNavigation from "./_components/sideNav"; import ProtectedPage from "./_components/protectedPage"; -import LoadingSpinner from "@/app/_components/loadingSpinner"; export default function AfterLoginLayout({ children, @@ -16,7 +15,7 @@ export default function AfterLoginLayout({ const [isModal, setIsModal] = useState(false); return ( <> - }> +
From 3d3537b5cb619ac4c5eb0fc5be4df3efcc7991a5 Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:33:24 +0900 Subject: [PATCH 04/20] =?UTF-8?q?feat:=20=EB=92=A4=EB=A1=9C=20=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(afterLogin)/_components/pageTitle.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/app/(afterLogin)/_components/pageTitle.tsx b/src/app/(afterLogin)/_components/pageTitle.tsx index 8eab46d..362108c 100644 --- a/src/app/(afterLogin)/_components/pageTitle.tsx +++ b/src/app/(afterLogin)/_components/pageTitle.tsx @@ -1,13 +1,14 @@ "use client"; -import { useSelectedLayoutSegments } from "next/navigation"; +import { useRouter, useSelectedLayoutSegments } from "next/navigation"; import WarningCircleIcon from "@/assets/WarningCircle.svg"; import MessageBubble from "./messageBubble"; import { useEffect, useState } from "react"; +import ArrowLeftIcon from "@/assets/ArrowLeft.svg"; export default function PageTitle() { const segments = useSelectedLayoutSegments(); - + const router = useRouter(); const [currentSegment, setCurrentSegment] = useState(segments[0]); const [isActivateMessage, setIsActivateMessage] = useState(false); @@ -45,12 +46,25 @@ export default function PageTitle() { } }; + // 뒤로가기 버튼 활성화 + const isBackButton = () => { + if (segments[1]) { + return true; + } + return false; + }; + return (
+ {isBackButton() && ( + + )}

{title()}

- {currentSegment !== "dashboard" && ( + {!isBackButton() &¤tSegment !== "dashboard" && (
{ From 97c67967dd524bcbe19c696008e78208ddc57aaf Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:33:45 +0900 Subject: [PATCH 05/20] =?UTF-8?q?fix:=20=EC=9D=B8=EC=A6=9D=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/protectedPage.tsx | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/app/(afterLogin)/_components/protectedPage.tsx b/src/app/(afterLogin)/_components/protectedPage.tsx index 10c72b3..0666477 100644 --- a/src/app/(afterLogin)/_components/protectedPage.tsx +++ b/src/app/(afterLogin)/_components/protectedPage.tsx @@ -11,39 +11,42 @@ interface Props { export default function ProtectedPage({ children }: Props) { const searchParams = useSearchParams(); - const { isInitialized, setInitialized } = useAuthStore(); + const { isInitialized, setInitialized, token } = useAuthStore(); const initializedRef = useRef(false); const [loading, setLoading] = useState(true); + const checkSocialLogin = () => { + const signUpRequired = searchParams.get("sign-up-required"); + + if (signUpRequired === "true") { + window.location.replace( + `/set-nickname?email=${searchParams.get("email")}` + ); + return; + } + }; + useEffect(() => { if (!initializedRef.current) { initializedRef.current = true; - const signUpRequired = searchParams.get("sign-up-required"); - - if (signUpRequired === "true") { - window.location.replace( - `/set-nickname?email=${searchParams.get("email")}` - ); - return; - } - const checkAuth = async () => { - try { - await reissue(); - } catch { - window.location.replace("/login"); - return; - } finally { + if (!token) { + await reissue() + .then(() => {}) + .catch(() => { + window.location.replace("/login"); + }); + setInitialized(true); + setLoading(false); } - - setLoading(false); }; + checkSocialLogin(); checkAuth(); } - }, [searchParams, setInitialized]); + }, []); if (loading || !isInitialized) return null; From 2517b20211c7fd17ced70f72745bb94e3a8cde27 Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:34:07 +0900 Subject: [PATCH 06/20] =?UTF-8?q?style:=20=ED=95=B4=EB=8B=B9=20path?= =?UTF-8?q?=EC=8B=9C=20=ED=8F=B0=ED=8A=B8=20bold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(afterLogin)/_components/sideNav.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/(afterLogin)/_components/sideNav.tsx b/src/app/(afterLogin)/_components/sideNav.tsx index b3a6553..20604a5 100644 --- a/src/app/(afterLogin)/_components/sideNav.tsx +++ b/src/app/(afterLogin)/_components/sideNav.tsx @@ -6,14 +6,16 @@ import CalendarBlank from "@/assets/CalendarBlank.svg"; import ClipboardText from "@/assets/ClipboardText.svg"; import House from "@/assets/House.svg"; import UserInfo from "./userInfo"; -import { usePathname } from "next/navigation"; +import { useSelectedLayoutSegments } from "next/navigation"; export default function SideNavigation({ setIsModal, }: { setIsModal: (value: boolean) => void; }) { - const pathname = usePathname(); + const segments = useSelectedLayoutSegments(); + const pathname = segments[0]; + return (
@@ -31,17 +33,17 @@ export default function SideNavigation({ - dashboard + Dashboard @@ -51,7 +53,7 @@ export default function SideNavigation({ @@ -61,7 +63,7 @@ export default function SideNavigation({ From ac431d5429cba2346eff9affcdf3b19c09c9bc4b Mon Sep 17 00:00:00 2001 From: strdeok Date: Mon, 8 Sep 2025 00:35:09 +0900 Subject: [PATCH 07/20] =?UTF-8?q?chore:=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EC=9D=B4=EB=8F=99=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(afterLogin)/applications/page.tsx | 61 +++++++++------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/src/app/(afterLogin)/applications/page.tsx b/src/app/(afterLogin)/applications/page.tsx index b8a5319..fc414a4 100644 --- a/src/app/(afterLogin)/applications/page.tsx +++ b/src/app/(afterLogin)/applications/page.tsx @@ -259,14 +259,7 @@ export default function ApplicationsPage() { /> - - {app.companyName} - + {app.companyName} {app.companyAddress || "-"} @@ -291,7 +284,7 @@ export default function ApplicationsPage() { {formatDate(deadline)}