Skip to content

Commit

Permalink
Merge pull request #45 from Project-Unifest/chore/adapt-to-hankyung
Browse files Browse the repository at this point in the history
fix : 토글 버튼 수정, signup API 오류 수정, 좌표 및 학교 값 수정
  • Loading branch information
algoORgoal authored Sep 23, 2024
2 parents f2a4486 + 235ab25 commit a0eddc0
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
19 changes: 14 additions & 5 deletions src/features/auth/model/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,27 @@ interface AuthDetails {
contact: string;
}

interface SignUpRequest {
email: string;
password: string;
schoolId: number;
phoneNum: string;
}

export const signUp = async (authDetails: AuthDetails) => {
const body: SignUpRequest = {
email: authDetails.email,
password: authDetails.password,
schoolId: authDetails.schoolId,
phoneNum: authDetails.contact,
};
const response = await fetch(`${API_URL}/members`, {
method: HttpMethods.POST,
headers: {
["content-type"]: "application/json",
},
// TODO change schoolId based on university
body: JSON.stringify({
...authDetails,
schoolId: 1,
phoneNum: authDetails.contact,
}),
body: JSON.stringify({ ...body, schoolId: 2 }),
});
const data = response.json();
return data;
Expand Down
4 changes: 2 additions & 2 deletions src/shared/model/store/booth-details-draft-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export type BoothDetailsDraftStore = BoothDetailsDraftState &
BoothDetailsDraftActions;

export enum CampusPosition {
latitude = 37.542352,
longitude = 127.076824,
latitude = 37.01107,
longitude = 127.263816,
}

export const defaultInitState = {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/model/store/booth-draft-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export type BoothDraftActions = {
export type BoothDraftStore = BoothDraftState & BoothDraftActions;

export enum CampusPosition {
latitude = 37.542352,
longitude = 127.076824,
latitude = 37.01107,
longitude = 127.263816,
}

export const defaultInitState = {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/model/store/booth-edit-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export type BoothDraftActions = {
export type BoothEditStore = BoothEditState & BoothDraftActions;

export enum CampusPosition {
latitude = 37.542352,
longitude = 127.076824,
latitude = 37.01107,
longitude = 127.263816,
}

export const defaultInitState = {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/model/store/booth-list-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export type BoothListActions = {
export type BoothListStore = BoothListState & BoothListActions;

export enum CampusPosition {
latitude = 37.542352,
longitude = 127.076824,
latitude = 37.01107,
longitude = 127.263816,
}

export const defaultInitState = {
Expand Down
5 changes: 4 additions & 1 deletion src/widgets/boothList/ui/BoothList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export function BoothList() {
deleteButton={<DeleteButton boothId={booth.id!} />}
switchButton={
<div className="flex flex-col items-end justify-start gap-2 ">
<BoothSwitchButton boothId={booth.id} />
<BoothSwitchButton
boothId={booth.id}
initialOpened={booth.enabled}
/>
<Button size="queue" state="queue" shape="rounded">
<Link
href={`/booths/${booth.id}`}
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/sign-up/lib/sign-up-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { z } from "zod";

export enum University {
Konkuk = "건국대 서울캠",
Hankyung = "한경대학교",
Transportation = "교통대학교",
}

export const signUpSchema = z
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/sign-up/ui/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export function SignUp() {
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value={University.Konkuk}>
{University.Konkuk}
<SelectItem value={University.Hankyung}>
{University.Hankyung}
</SelectItem>
</SelectContent>
</Select>
Expand Down

1 comment on commit a0eddc0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for unifest-web-deployment ready!

✅ Preview
https://unifest-web-deployment-4crxmi945-algoorgoals-projects.vercel.app

Built with commit a0eddc0.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.