From 615487c3b531817d4bb0f3c5935df0a62834bed6 Mon Sep 17 00:00:00 2001 From: SeieunYoo Date: Sun, 28 Jul 2024 22:52:29 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix=20:=20=EB=B9=8C=EB=93=9C=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95=20,=20ci=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 30 +++++++++++++++ src/apis/auth/createGuestUserApi.ts | 6 +-- src/apis/member/createBasicInfoApi.ts | 6 ++- src/components/auth/DepartmentSelect.tsx | 21 +++++----- .../guard/StudentVerificationAccessGuard.tsx | 7 +--- src/components/myPage/PaymentStatus.tsx | 9 ++--- src/hooks/auth/useStudentVerification.ts | 2 +- src/pages/ForwardRef.tsx | 38 ------------------- src/pages/StudentVerification.tsx | 2 +- 9 files changed, 57 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 src/pages/ForwardRef.tsx diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..51e6faa --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/src/apis/auth/createGuestUserApi.ts b/src/apis/auth/createGuestUserApi.ts index b06c44d..bb76259 100644 --- a/src/apis/auth/createGuestUserApi.ts +++ b/src/apis/auth/createGuestUserApi.ts @@ -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; //이거 안쓰는 거 같은데 } diff --git a/src/apis/member/createBasicInfoApi.ts b/src/apis/member/createBasicInfoApi.ts index d4e18c5..434dbe8 100644 --- a/src/apis/member/createBasicInfoApi.ts +++ b/src/apis/member/createBasicInfoApi.ts @@ -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 + ) => { const response = await apiClient.post( '/onboarding/members/me/basic-info', payload diff --git a/src/components/auth/DepartmentSelect.tsx b/src/components/auth/DepartmentSelect.tsx index 2badecd..9bcd53f 100644 --- a/src/components/auth/DepartmentSelect.tsx +++ b/src/components/auth/DepartmentSelect.tsx @@ -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) => { diff --git a/src/components/auth/guard/StudentVerificationAccessGuard.tsx b/src/components/auth/guard/StudentVerificationAccessGuard.tsx index 3107d0f..7ec9007 100644 --- a/src/components/auth/guard/StudentVerificationAccessGuard.tsx +++ b/src/components/auth/guard/StudentVerificationAccessGuard.tsx @@ -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 ; diff --git a/src/components/myPage/PaymentStatus.tsx b/src/components/myPage/PaymentStatus.tsx index 4976194..7b6f731 100644 --- a/src/components/myPage/PaymentStatus.tsx +++ b/src/components/myPage/PaymentStatus.tsx @@ -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'; @@ -15,16 +14,16 @@ interface PaymentStatusProps { } export const PaymentStatus = ({ - paymentStatus, - depositorName + paymentStatus + //depositorName }: PaymentStatusProps) => { const navigate = useNavigate(); - const handleClickRoute = (e: MouseEvent) => { + const handleClickRoute = () => { if (paymentStatus !== 'PENDING') { return; } - navigate(RoutePath.Payments); + navigate(RoutePath.PaymentsCheckout); }; return ( diff --git a/src/hooks/auth/useStudentVerification.ts b/src/hooks/auth/useStudentVerification.ts index 84cc4eb..ec800f5 100644 --- a/src/hooks/auth/useStudentVerification.ts +++ b/src/hooks/auth/useStudentVerification.ts @@ -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); }; diff --git a/src/pages/ForwardRef.tsx b/src/pages/ForwardRef.tsx deleted file mode 100644 index f20940a..0000000 --- a/src/pages/ForwardRef.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { - forwardRef, - InputHTMLAttributes, - ForwardedRef, - Ref, - TextareaHTMLAttributes -} from 'react'; -import TextField from 'wowds-ui/TextField'; - -interface InputProps extends InputHTMLAttributes { - value: string; - label?: string; - errorText?: string; - isError?: boolean; -} - -export const Input = forwardRef( - ( - { value, placeholder, label = '', errorText, isError = false, ...props }, - ref - ) => { - return ( - } - // error={isValid} - // helperText={errors.name?.message} - value={value} - placeholder={placeholder} - /> - ); - } -); - -Input.displayName = 'Input'; diff --git a/src/pages/StudentVerification.tsx b/src/pages/StudentVerification.tsx index 7a0657c..9668a05 100644 --- a/src/pages/StudentVerification.tsx +++ b/src/pages/StudentVerification.tsx @@ -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(); From 332de39b74e3f7be1608f853bc735b05c8f43379 Mon Sep 17 00:00:00 2001 From: SeieunYoo Date: Sun, 28 Jul 2024 22:56:01 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix=20:=20ci=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51e6faa..449afb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: build on: push: @@ -23,8 +23,14 @@ jobs: with: node-version: 20.x + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + - name: Install dependencies run: pnpm install - name: Run build - run: npm run build + run: pnpm run build From e0f522baaedc000b6650ddfa88fa6996fa811ea0 Mon Sep 17 00:00:00 2001 From: SeieunYoo Date: Sun, 28 Jul 2024 23:42:24 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix=20:svg=20=EC=86=8D=EC=84=B1,=20?= =?UTF-8?q?=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/Onboarding.tsx | 26 ++++----- src/assets/OnboardingArrow.tsx | 2 +- src/assets/SelectBoxArrorw.tsx | 2 +- src/components/myPage/JoinRegularMember.tsx | 17 +++++- src/components/myPage/PaymentStatus.tsx | 64 --------------------- 5 files changed, 31 insertions(+), 80 deletions(-) delete mode 100644 src/components/myPage/PaymentStatus.tsx diff --git a/src/assets/Onboarding.tsx b/src/assets/Onboarding.tsx index a215a96..2c5c2ec 100644 --- a/src/assets/Onboarding.tsx +++ b/src/assets/Onboarding.tsx @@ -181,14 +181,14 @@ export const OnboardingLogo2 = () => { { fill="#FBBC04" /> { diff --git a/src/assets/OnboardingArrow.tsx b/src/assets/OnboardingArrow.tsx index c758f22..5684a2f 100644 --- a/src/assets/OnboardingArrow.tsx +++ b/src/assets/OnboardingArrow.tsx @@ -3,7 +3,7 @@ export const OnboardingArrow = () => { <>