Skip to content

Commit

Permalink
fix : 빌드 에러 수정 , ci 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
SeieunYoo committed Jul 28, 2024
1 parent 6db6ffd commit 615487c
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 64 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: 20.x

- name: Install dependencies
run: pnpm install

- name: Run build
run: npm run build
6 changes: 3 additions & 3 deletions src/apis/auth/createGuestUserApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import apiClient from '@/apis';
import type { GuestUser } from '@/types/user';
import type { User } from '@/types/user';

export default async function createGuestUserApi(user: GuestUser) {
return (await apiClient.post(`/onboarding/members`, user)).data;
export default async function createGuestUserApi(user: User) {
return (await apiClient.post(`/onboarding/members`, user)).data; //이거 안쓰는 거 같은데
}
6 changes: 4 additions & 2 deletions src/apis/member/createBasicInfoApi.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import apiClient from '@/apis';

import { MemberBasicInfoType } from './memberType';
import { UserBasicInfo } from '@/types/user';

const createBasicInfoApi = {
BASIC_INFO: async (payload: MemberBasicInfoType) => {
BASIC_INFO: async (
payload: Omit<UserBasicInfo, 'discordName' | 'nickname' | 'discordUsername'>
) => {
const response = await apiClient.post(
'/onboarding/members/me/basic-info',
payload
Expand Down
21 changes: 12 additions & 9 deletions src/components/auth/DepartmentSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import { Control, Controller } from 'react-hook-form';
import DropDown from 'wowds-ui/DropDown';
import DropDownOption from 'wowds-ui/DropDownOption';
type DepartmentSelectProps = {
control: Control<{
name: '';
studentId: '';
phone: '';
department: '';
email: '';
terms: false;
personalPrivacy: false;
}>;
control:
| Control<{
name: string;
studentId: string;
phone: string;
department: string;
email: string;
emailDomain: string;
terms: boolean;
personalPrivacy: boolean;
}>
| undefined;
};

const DepartmentSelect = ({ control }: DepartmentSelectProps) => {
Expand Down
7 changes: 2 additions & 5 deletions src/components/auth/guard/StudentVerificationAccessGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import LandingStatus from '@/constants/landingStatus';
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import { getAuthRedirectPath } from '@/utils/auth';
import { Navigate, Outlet } from 'react-router-dom';
import { Outlet } from 'react-router-dom';

export default function StudentVerificationAccessGuard() {
const { landingStatus } = useLandingStatus();
// const { landingStatus } = useLandingStatus();

// if (landingStatus !== LandingStatus.StudentAuthentication) {
// return <Navigate to={getAuthRedirectPath(landingStatus)} />;
Expand Down
9 changes: 4 additions & 5 deletions src/components/myPage/PaymentStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import RoutePath from '@/routes/routePath';
import styled from '@emotion/styled';

import { useNavigate } from 'react-router-dom';
import { MouseEvent } from 'react';

export type PaymentStatusType = 'PENDING' | 'VERIFIED';

Expand All @@ -15,16 +14,16 @@ interface PaymentStatusProps {
}

export const PaymentStatus = ({
paymentStatus,
depositorName
paymentStatus
//depositorName
}: PaymentStatusProps) => {
const navigate = useNavigate();

const handleClickRoute = (e: MouseEvent<HTMLDivElement>) => {
const handleClickRoute = () => {
if (paymentStatus !== 'PENDING') {
return;
}
navigate(RoutePath.Payments);
navigate(RoutePath.PaymentsCheckout);
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/auth/useStudentVerification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function useStudentVerification() {
const { sendStudentEmail, ...rest } = useSendStudentEmail();

const onSubmit = async ({ univEmail }: FieldValues) => {
event.preventDefault();
event?.preventDefault();
updateUnivEmail(univEmail);
sendStudentEmail(univEmail);
};
Expand Down
38 changes: 0 additions & 38 deletions src/pages/ForwardRef.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/StudentVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import GlobalSize from '@/constants/globalSize';
export const StudentVerification = () => {
const navigate = useNavigate();
//TODO: 추후 pending 상태 백엔드 API 수정하면 반영해둘것.
const [pending, setPending] = useState(false);
const [, setPending] = useState(false);
const [isClicked, setIsClicked] = useState(false);
const { onSubmit, control, isValid, onVerifyStudent, loading } =
useStudentVerification();
Expand Down

0 comments on commit 615487c

Please sign in to comment.