diff --git a/apps/admin/app/api/auth/MemberType.ts b/apps/admin/app/api/auth/MemberType.ts new file mode 100644 index 00000000..61efcf93 --- /dev/null +++ b/apps/admin/app/api/auth/MemberType.ts @@ -0,0 +1,32 @@ +import type { Status } from "types/status"; +import type { User } from "types/user"; + +export interface MemberInfoResponse { + member: User; + currentRecruitmentRound: CurrentRecruitmentType; + currentMembership: CurrentMembershipType; +} + +export interface CurrentRecruitmentType { + recruitmentId: number; + name: string; + period: { + startDate: string; + endDate: string; + open: boolean; + }; + fee: number; + roundType: "FIRST" | "SECOND"; + roundTypeValue: string; +} + +export interface CurrentMembershipType { + membershipId: number; + memberId: number; + recruitmentId: number; + regularRequirement: { + paymentStatus: Status; + allSatisfied: boolean; + paymentSatisfied: boolean; + }; +} diff --git a/apps/admin/app/api/auth/route.tsx b/apps/admin/app/api/auth/route.tsx new file mode 100644 index 00000000..99311242 --- /dev/null +++ b/apps/admin/app/api/auth/route.tsx @@ -0,0 +1,13 @@ +export const dynamic = "force-static"; + +export async function GET() { + const res = await fetch( + "https://dev-api.gdschongik.com/onboarding/members/me/dashboard", + { + credentials: "same-origin", + } + ); + const data = await res.json(); + + return Response.json({ data }); +} diff --git a/apps/admin/app/layout.tsx b/apps/admin/app/layout.tsx index 4a4d1f93..d22ef12b 100644 --- a/apps/admin/app/layout.tsx +++ b/apps/admin/app/layout.tsx @@ -1,7 +1,6 @@ import "./global.css"; import "wowds-ui/styles.css"; -import Navbar from "components/Navbar"; import type { Metadata } from "next"; import { JotaiProvider } from "../components/JotaiProvider"; diff --git a/apps/admin/app/studies/createStudy/page.tsx b/apps/admin/app/studies/createStudy/page.tsx new file mode 100644 index 00000000..deb90261 --- /dev/null +++ b/apps/admin/app/studies/createStudy/page.tsx @@ -0,0 +1,5 @@ +const CreateStudyPage = () => { + return
스터디 생성
; +}; + +export default CreateStudyPage; diff --git a/apps/admin/components/auth/isMentor.tsx b/apps/admin/components/auth/isMentor.tsx deleted file mode 100644 index e73ce9d6..00000000 --- a/apps/admin/components/auth/isMentor.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { fetcher } from "@wow-class/utils"; - -const isMentor = () => {}; - -export default isMentor(); diff --git a/apps/admin/components/createStudy/CreateStudyButton.tsx b/apps/admin/components/createStudy/CreateStudyButton.tsx index 5e989356..9c379539 100644 --- a/apps/admin/components/createStudy/CreateStudyButton.tsx +++ b/apps/admin/components/createStudy/CreateStudyButton.tsx @@ -1,9 +1,15 @@ +"use client"; import { css } from "@styled-system/css"; import { Flex } from "@styled-system/jsx"; +import { useRouter } from "next/navigation"; const CreateStudyButton = () => { + const router = useRouter(); return ( -