-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const CreateStudyPage = () => { | ||
return <div>스터디 생성</div>; | ||
}; | ||
|
||
export default CreateStudyPage; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type ManageRole = "ADMIN" | "NONE"; | ||
export type StudyRole = "MENTOR" | "STUDENT"; | ||
export type UserRoleType = "GUEST" | "ASSOCIATE" | "REGULAR"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export type Status = "UNSATISFIED" | "SATISFIED"; | ||
export type UnivEmailStatus = "IN_PROGRESS" | "UNSATISFIED" | "SATISFIED"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { ManageRole, StudyRole, UserRoleType } from "./role"; | ||
import type { Status, UnivEmailStatus } from "./status"; | ||
|
||
export type User = { | ||
memberId: string; // C000000 (학번) | ||
role: UserRoleType; | ||
basicInfo: UserBasicInfo; | ||
manageRole: ManageRole; | ||
studyRole: StudyRole; | ||
associateRequirement: { | ||
univStatus: UnivEmailStatus; | ||
discordStatus: Status; | ||
bevyStatus: Status; | ||
infoStatus: Status; | ||
}; | ||
}; | ||
|
||
export type AssociateRequirement = { | ||
univStatus: UnivEmailStatus; | ||
discordStatus: Status; | ||
bevyStatus: Status; | ||
infoStatus: Status; | ||
}; | ||
|
||
export type UserBasicInfo = { | ||
name: string; | ||
studentId: string; | ||
email: string; | ||
department: string; | ||
phone: string; | ||
discordUsername: string; | ||
nickname: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { fetcher } from "@wow-class/utils"; | ||
import type { User } from "types/user"; | ||
|
||
const isMentor = async () => { | ||
const response = await fetcher | ||
.get<User>("/onboarding/members/me/dashboard", { | ||
credentials: "include", | ||
}) | ||
.then((response) => { | ||
console.log(response.data?.studyRole); | ||
}); | ||
}; | ||
|
||
export default isMentor; |