Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deploy]: 마이너 UI 이슈 수정 (2.0.1) #99

Merged
merged 139 commits into from
Aug 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
d033423
fix: cookie test
kongnayeon Mar 2, 2024
535a440
dev deploy
kongnayeon Mar 7, 2024
b0e9d24
fix: 개발 환경 https 설정 제거
eugene028 Jun 23, 2024
5126284
chore: mkcert 패키지 제거
eugene028 Jun 23, 2024
ff0634d
chore: PR 템플릿 생성
eugene028 Jun 23, 2024
10476e3
Merge pull request #50 from GDSC-Hongik/feature/#48
eugene028 Jun 26, 2024
3791e97
[Chore] 패키지 매니저를 pnpm으로 변경해요. (#52)
eugene028 Jun 26, 2024
3f92ef6
fix : eslint,prettier 제대로 되게 수정
SeieunYoo Jun 28, 2024
8aa774c
Merge pull request #54 from GDSC-Hongik/fix/eslint-prettier
SeieunYoo Jun 29, 2024
f444394
[Chore] client 서비스에 wow-design 시스템을 적용해요. (#56)
eugene028 Jul 3, 2024
f251268
feat : 디스코드 튜토리얼 UI 1차 반영
SeieunYoo Jul 4, 2024
d2b29bd
feat : 가이드까지 UI 완성
SeieunYoo Jul 4, 2024
4ded610
feat : width 에도 반영
SeieunYoo Jul 4, 2024
9eb9557
fix : spaceKet 로 타입 수정
SeieunYoo Jul 4, 2024
34ad422
feat : spacing 토큰 변경
SeieunYoo Jul 10, 2024
60ccbf8
feat : ㄹ리뷰 반영
SeieunYoo Jul 10, 2024
f4bebc6
feat : 디스코드 api 연결
SeieunYoo Jul 10, 2024
6714a7c
feat : Image 컴포넌트 타입 수정
SeieunYoo Jul 12, 2024
8c0d322
fix: space 토큰 수정
SeieunYoo Jul 12, 2024
a46eeee
Merge pull request #58 from GDSC-Hongik/feature/#55
SeieunYoo Jul 12, 2024
40c5516
[Feature] github 로그인 페이지를 2차 MVP 페이지에 맞게 수정해요. (#62)
eugene028 Jul 13, 2024
f37fd9a
Merge branch 'dev' of https://github.com/GDSC-Hongik/gdsc-client into…
SeieunYoo Jul 14, 2024
4ca5f47
refactor : 리팩토링 및 변수명 변경
SeieunYoo Jul 14, 2024
9102657
fix: 하드코딩된 토큰 환경변수에 저장
SeieunYoo Jul 14, 2024
7ced34e
Create CODEOWNERS
SeieunYoo Jul 14, 2024
aa3420f
[Feature] 대시보드 2차 MVP DTO에 맞게 뷰를 수정해요. (#57)
eugene028 Jul 15, 2024
dcab5f1
[Feature] 기본 회원 정보를 받을 수 있는 Signup 페이지를 2차 MVP에 맞게 수정해요. (#60)
eugene028 Jul 15, 2024
53a6d28
Merge pull request #69 from GDSC-Hongik/feature/code-owner
SeieunYoo Jul 15, 2024
e4f4c22
refactor : query 관련 훅으로 리팩토링, Space 컴포넌트 수정
SeieunYoo Jul 19, 2024
1a7f658
fix: getValues 로 수정
SeieunYoo Jul 19, 2024
d4364ec
refactor: react-hook-form 의 pattern 사용해서 유효성 검증
SeieunYoo Jul 20, 2024
2be0e63
Merge branch 'dev' of https://github.com/GDSC-Hongik/gdsc-client into…
SeieunYoo Jul 20, 2024
37329ca
feat : 라우팅 반영
SeieunYoo Jul 20, 2024
11c282a
style : width 100% 수정
SeieunYoo Jul 20, 2024
8763acd
[Feature] 정회원 지원하기 액션시트를 생성하고, API를 연결해요. (#63)
eugene028 Jul 20, 2024
60f5a82
[Feature] Bevy 가입 인증 절차를 생성해요. (#70)
eugene028 Jul 20, 2024
f4d5aae
Merge pull request #68 from GDSC-Hongik/feature/discord-api
SeieunYoo Jul 20, 2024
305ee71
[Feature] 홍익대학교 Gmail을 통해 재학생 인증 기능을 만들어요. (#67)
eugene028 Jul 25, 2024
2ec33a7
feat: 회비 납부 플로우 추가
hamo-o Jun 23, 2024
abb0c47
feat: 토스페이먼츠 결제하기 라우팅
hamo-o Jun 23, 2024
dc0a67b
feat: 토스페이먼츠 클라이언트키 임시등록
hamo-o Jun 24, 2024
398daa4
feat: 총 결제금액 표시
hamo-o Jun 24, 2024
93c7987
feat: 결제 성공 시 마이페이지로 리다이렉트
hamo-o Jun 24, 2024
44a3cf4
chore: 결제 위젯 연동에 필요한 패키지 설치
hamo-o Jun 24, 2024
b7359ae
fix: PENDING 상태일 때만 결제창 띄움
hamo-o Jun 24, 2024
cf3ec9e
fix: 총 결제 금액 임시 하드코딩
hamo-o Jun 24, 2024
72b3c48
feat: coupon API 추가
hamo-o Jun 26, 2024
4114488
design: 결제창 레이아웃 변경
hamo-o Jun 26, 2024
4a14aac
feat: 결제 성공 및 실패 화면, 라우팅
hamo-o Jul 3, 2024
2398bab
chore: wowds-ui 설치
hamo-o Jul 3, 2024
9b1ba60
feat: wowds로 마이그레이션
hamo-o Jul 3, 2024
e10336e
design: wowds UI 적용
hamo-o Jul 3, 2024
297ee97
fix: Box 테두리 색상 임시 변경
hamo-o Jul 7, 2024
ce2b7c7
feat: 결제정보 전달 API
hamo-o Jul 7, 2024
778bce7
feat: 유저정보 API 임시설정
hamo-o Jul 7, 2024
3eb65e4
feat: 쿠폰 타입 변경
hamo-o Jul 7, 2024
8dc797d
feat: 토스페이먼츠 최신 API 임시 구현 사항
hamo-o Jul 7, 2024
98cfb3d
fix: API post -> get
hamo-o Jul 7, 2024
c977955
chore: payments 라이브러리 업데이트
hamo-o Jul 7, 2024
49441e2
feat: 토스페이먼츠 위젯 라이브러리 업데이트에 의한 기능구현 변경
hamo-o Jul 7, 2024
0224595
feat: useProduct hook으로 결제 관리
hamo-o Jul 9, 2024
e189c5e
fix: 결제 실패 시 쿠폰 적용 페이지로 라우팅
hamo-o Jul 9, 2024
7d3461d
chore: react-secure-storage 설치
hamo-o Jul 9, 2024
516bde6
feat: ENV 추가
hamo-o Jul 9, 2024
1ede9d6
feat: 결제 정보 암호화, 로컬스토리지 저장
hamo-o Jul 9, 2024
1401a8e
fix: 할인금액이 있을 때만 노출
hamo-o Jul 9, 2024
1f65621
feat: 결제 실패 시 로컬스토리지 초기화
hamo-o Jul 9, 2024
7c098f5
fix: 스토리지 리턴타입 단언
hamo-o Jul 10, 2024
897be1b
fix: 토스페이먼츠 타입 any 허용
hamo-o Jul 10, 2024
f9d9fcc
refactor: 회비 납부 페이지 컴포넌트 분리
hamo-o Jul 11, 2024
03e4511
feat: 임시 주문과 결제 승인 API 구분하기
hamo-o Jul 11, 2024
eb251f8
fix: 토스페이먼츠 테스트를 위한 로직 수정
hamo-o Jul 12, 2024
c804bc2
feat: 주문완료 API 추가
hamo-o Jul 22, 2024
59eca0e
design: 회비 납부 UI 수정
hamo-o Jul 22, 2024
9900987
feat: 쿠폰 정보 추가
hamo-o Jul 22, 2024
953c30f
refactor: 라우팅 없이 결제 위젯 연결
hamo-o Jul 22, 2024
c244eae
fix: 결제 실패 시 라우팅 변경
hamo-o Jul 22, 2024
7528bb5
fix: 스토리지 관련 로직 삭제
hamo-o Jul 22, 2024
df087cf
fix: 스토리지 관련 로직 삭제
hamo-o Jul 22, 2024
411f852
refactor: useProduct 훅, 관련 로직 리렌더링 최소화 리팩토링
hamo-o Jul 22, 2024
9d358ad
fix: 스토리지 clear 로직 삭제
hamo-o Jul 22, 2024
a07e0b4
fix: 테스트용 API 제거
hamo-o Jul 22, 2024
9373a7a
chore: 주석 제거
hamo-o Jul 22, 2024
86c83a4
chore: console.log 삭제
hamo-o Jul 26, 2024
8b76b54
chore: wowds-ui 버전업
hamo-o Jul 26, 2024
a443476
refactor: 쿠폰 드롭다운
hamo-o Jul 26, 2024
8bed4b0
feat: 무료 주문 생성 API
hamo-o Jul 26, 2024
55edcfe
feat: 주문 생성 API mutation hook으로 변경, 총 가격에 따른 API 조건부 반환
hamo-o Jul 26, 2024
7b8f57e
feat: 주문 완료 API mutation hook으로 변경
hamo-o Jul 26, 2024
6db6ffd
Merge pull request #71 from GDSC-Hongik/feature/tosspayments
hamo-o Jul 28, 2024
615487c
fix : 빌드 에러 수정 , ci 작성
SeieunYoo Jul 28, 2024
332de39
fix : ci 수정
SeieunYoo Jul 28, 2024
e0f522b
fix :svg 속성, 필요없는 컴포넌트 삭제
SeieunYoo Jul 28, 2024
e478511
fix : 안쓰는 api 삭제
SeieunYoo Jul 28, 2024
fa091b5
Merge pull request #73 from GDSC-Hongik/fix/dev-build-error
SeieunYoo Jul 28, 2024
295840a
[Fix]: 디스코드 연동 마이너 이슈 수정 (#75)
eugene028 Jul 31, 2024
3156fa8
[Fix]: Signup 페이지 마이너 UI 이슈 수정 (#74)
eugene028 Jul 31, 2024
41aedbf
feat: 푸터 텍스트 로고 추가
hamo-o Jul 31, 2024
168dd5f
feat: 푸터 UI
hamo-o Jul 31, 2024
17f8346
fix: 기존 홈 온보딩 이미지 삭제
hamo-o Jul 31, 2024
29b0ba1
Merge pull request #76 from GDSC-Hongik/feature/footer
hamo-o Jul 31, 2024
0199b94
feat : qa반영
SeieunYoo Jul 31, 2024
e5d2f81
Merge branch 'dev' of https://github.com/GDSC-Hongik/gdsc-client into…
SeieunYoo Jul 31, 2024
51b373b
fix : 불필요한 스타일 삭제, 텍필에 100% 추가
SeieunYoo Jul 31, 2024
4de4ff3
Merge pull request #77 from GDSC-Hongik/feat/discord-qa
SeieunYoo Aug 1, 2024
909c3c5
[Refactor] : 학교 이메일 인증 페이지 QA 개선 반영 (#80)
eugene028 Aug 3, 2024
d05a763
[Refactor] : Signup 페이지 QA 개선 반영 (#79)
eugene028 Aug 3, 2024
6956073
[Feature]: Sentry 세팅 (#81)
eugene028 Aug 5, 2024
6eb7525
fix: 논리 테스트 (#82)
eugene028 Aug 5, 2024
d0ec09d
[Chore]: Sentry 논리 되돌리기 (#83)
eugene028 Aug 5, 2024
b44b0ff
[Chore] : 빌드로그에서 vercel 환경변수 볼 수 있도록 하기 (#84)
eugene028 Aug 5, 2024
93e24cd
fix: 로딩 스피너 추가 및 기존 패키지 제거 (#89)
eugene028 Aug 7, 2024
0fd9a5d
[Refactor]: 마이너 UI 이슈 수정 (#90)
eugene028 Aug 7, 2024
fad9986
[Refactor] : 결제 페이지에 준회원이 아닌 경우 접근하지 못하도록 해요. (#88)
eugene028 Aug 7, 2024
46e38fe
[Refactor]: 학교 이메일 인증 정책을 변경해요 (#91)
eugene028 Aug 7, 2024
91c5e2b
[Fix] 토스페이먼츠 QA 개선 반영 (#93)
hamo-o Aug 7, 2024
ec0f37a
[Fix]: 서버 로그인 로직 변경에 따른 AccessToken, RefeshToken 쿠키 세팅 제거 및 landingSt…
eugene028 Aug 7, 2024
3dad6b1
[Fix] 토스페이먼츠 결제성공 페이지 가드 임시삭제 (#94)
hamo-o Aug 7, 2024
d1a5934
fix: 디스코드 관련 qa 반영
SeieunYoo Aug 9, 2024
b094392
feat : 인증을 완료한 경우에는 대시보드로 라우팅 하는 가드 설정
SeieunYoo Aug 9, 2024
165916c
[Fix]: 0807 QA 반영 (#95)
eugene028 Aug 9, 2024
ca30a99
Merge branch 'dev' into fix/seieun-qa
eugene028 Aug 9, 2024
206c1f6
fix: username 닉네임 잘못된 부분 수정
eugene028 Aug 9, 2024
47368bf
fix: 대기중 문구만 뜨는 것 고치기
eugene028 Aug 9, 2024
473037f
fix: console log 삭제
SeieunYoo Aug 10, 2024
c35a8c5
fix: 합류 확인 여부 리팩토링
eugene028 Aug 11, 2024
5b7d0aa
fix: 로그인 코드 변경
eugene028 Aug 11, 2024
99d182b
Merge branch 'fix/seieun-qa' of https://github.com/GDSC-Hongik/gdsc-c…
eugene028 Aug 11, 2024
1cc4856
fix:joinServer 안내문구
eugene028 Aug 11, 2024
63a2e1c
Merge branch 'main' into dev
eugene028 Aug 11, 2024
f75f601
fix:빌드실패 고치기
eugene028 Aug 11, 2024
89722f7
Merge pull request #96 from GDSC-Hongik/fix/seieun-qa
SeieunYoo Aug 11, 2024
8e94e8f
fix:서버 status 변경사항 반영
eugene028 Aug 11, 2024
80b5775
Merge branch 'dev' of https://github.com/GDSC-Hongik/gdsc-client into…
eugene028 Aug 11, 2024
0f07894
fix: build 에러 해결
eugene028 Aug 11, 2024
a222441
fix: paymentStatus enum 변경
eugene028 Aug 11, 2024
bfcc866
[Fix] 토스페이먼츠 쿠폰 관련 QA 사항 반영 (#97)
hamo-o Aug 11, 2024
11c72e5
fix: 상용배포 마이너 UI 이슈
eugene028 Aug 11, 2024
bdd919b
Merge branch 'main' into dev
eugene028 Aug 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Fix]: 서버 로그인 로직 변경에 따른 AccessToken, RefeshToken 쿠키 세팅 제거 및 landingSt…
…atus 제거 (#87)

* fix: 논리 테스트

* fix: sentry 논리판단 되돌리기

* chore: console 테스트

* fix: cookie base-url 상위 도메인으로 변경

* fix: landingStatus 로직 제거

* fix: 메인화면 지원하기 버튼 dashboard로 라우트

* fix:landingStatus 삭제 및 쿠키로직 수정

* fix: landingStatus 관련된 모든 로직 제거

* fix: 쿠키 판단 로직 재건

* fix: 필요없는 guard 모두 삭제

* fix: 리다이렉트 정리

* fix: 로그인 유지 시간 sessionStorage에서 확인

* fix: 쿠키 관련 도메인 로직 모두 삭제

* fix: Cookie 관련 모든 로직 삭제

* fix: 빌드에러 터지는거 해결

* fix: 서버에서 refresh갱신 실패할때 로그아웃 처리

* fix: 403 에러 왔을때 세션 만료

* fix: 모집 기간 마감 예외처리

* fix: 파일 확장명 변경
eugene028 authored Aug 7, 2024
commit ec0f37a077c5bc38b693b85481d6e6963ade2ed1
12 changes: 3 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -12,9 +12,8 @@ import styled from '@emotion/styled';
import { css } from '@emotion/react';
import GlobalSize from '@/constants/globalSize';
import { useNavigate } from 'react-router-dom';
import { getAuthRedirectPath } from '@/utils/auth';
import 'react-toastify/dist/ReactToastify.css';
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import RoutePath from './routes/routePath';

const IMG_SRC = [
'/onboarding/1.png',
@@ -29,7 +28,6 @@ const IMG_SRC = [

function App() {
const navigate = useNavigate();
const { landingStatus } = useLandingStatus();

return (
<Wrapper direction="column">
@@ -162,12 +160,8 @@ function App() {
<JoinText />
<OnboardingLogo2 />
<Space height={25} />
<ApplyButton
disabled={landingStatus === 'ONBOARDING_CLOSED'}
onClick={() => navigate(getAuthRedirectPath(landingStatus))}>
{landingStatus === 'ONBOARDING_CLOSED'
? '지금은 지원 기간이 아니에요'
: '가입하기'}
<ApplyButton onClick={() => navigate(RoutePath.Dashboard)}>
가입하기
</ApplyButton>
<Space height={40} />
</BlueSection>
11 changes: 7 additions & 4 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BASE_URL, DEV_AUTH_TOKEN } from '@/constants/environment';
import useAuthToken from '@/hooks/auth/useAuthToken';
import axios from 'axios';

const apiClient = axios.create({
@@ -8,8 +7,12 @@ const apiClient = axios.create({
withCredentials: true
});

apiClient.defaults.headers.common['Authorization'] = DEV_AUTH_TOKEN
? `${DEV_AUTH_TOKEN}`
: `Bearer ${useAuthToken().accessToken}`;
export function setAuthHeader() {
if (DEV_AUTH_TOKEN) {
apiClient.defaults.headers.common['Authorization'] = DEV_AUTH_TOKEN;
}
}

setAuthHeader();

export default apiClient;
3 changes: 2 additions & 1 deletion src/components/ApiErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -31,7 +31,8 @@ export default function ApiErrorBoundary({ children }: PropsWithChildren) {
case 401:
case 403:
toast.error(message);
redirect(RoutePath.Index);
sessionStorage.setItem('isLogin', 'false');
redirect(RoutePath.Home);
break;
default:
toast.error(message);
24 changes: 18 additions & 6 deletions src/components/auth/guard/AuthAccessGuard.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import { useEffect } from 'react';
import { Outlet } from 'react-router-dom';
import RoutePath from '@/routes/routePath';
import { isAuthenticated } from '@/utils/auth';
import { toast } from 'react-toastify';
import { useNavigate, Outlet } from 'react-router-dom';
import { useEffect, useState } from 'react';

export default function AuthAccessGuard() {
const { clearLandingStatus } = useLandingStatus();
const navigate = useNavigate();
const [redirect, setRedirect] = useState(false);

useEffect(() => {
clearLandingStatus();
if (!isAuthenticated()) {
toast.error('로그인이 필요한 서비스예요.');
setRedirect(true);
}
}, []);

return <Outlet />;
useEffect(() => {
if (redirect) {
navigate(RoutePath.Home);
}
}, [redirect, navigate]);

return isAuthenticated() ? <Outlet /> : null;
}
14 changes: 0 additions & 14 deletions src/components/auth/guard/MypageAccessGuard.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions src/components/auth/guard/OnboardingClosedAccessGuard.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions src/components/auth/guard/OnboardingNotOpenedAccessGuard.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/components/auth/guard/SignupAccessGuard.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/components/auth/guard/StudentVerificationAccessGuard.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/auth/guard/index.ts

This file was deleted.

19 changes: 9 additions & 10 deletions src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -3,21 +3,22 @@ import { Logo } from '@/assets/LogoIcon';
import { Flex } from '@/components/common/Wrapper';
import { JoinButton } from '@/components/layout/JoinButton';
import GlobalSize from '@/constants/globalSize';
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import RoutePath from '@/routes/routePath';
import { color } from 'wowds-tokens';
import { media } from '@/styles';
import { getAuthRedirectPath } from '@/utils/auth';
import styled from '@emotion/styled';
import { useLocation, useNavigate } from 'react-router-dom';
import { useNavigate } from 'react-router-dom';
import { isAuthenticated } from '@/utils/auth';

//TODO: 백엔드 로그인 로직 수정 이후 반영 필요
export default function Header() {
const navigation = useNavigate();
const { pathname } = useLocation();
const { landingStatus } = useLandingStatus();

const handleClick = () => {
navigation(getAuthRedirectPath(landingStatus));
if (isAuthenticated()) navigation(RoutePath.Dashboard);
else {
navigation(RoutePath.GithubSignin);
}
};

return (
@@ -29,11 +30,9 @@ export default function Header() {
<HeaderLogo />
</Flex>
</LogoContainer>

{landingStatus === 'TO_DASHBOARD' && (
{isAuthenticated() ? (
<JoinButton onClick={handleClick}>내 정보</JoinButton>
)}
{pathname === '/' && landingStatus !== 'TO_DASHBOARD' && (
) : (
<JoinButton onClick={handleClick}>로그인/가입하기</JoinButton>
)}
</HeaderContainter>
6 changes: 3 additions & 3 deletions src/components/myPage/ApproveBox.tsx
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ export const ApproveBox = ({
};
return (
<>
{currentRecruitment.period.open ? (
{currentRecruitment ? (
<BoxWrapper
onClick={() => {
if (role === 'ASSOCIATE') handleBottomSheet();
@@ -66,8 +66,8 @@ export const ApproveBox = ({
) : (
<Box
variant="warn"
text="학회원 모집이 마감되었어요"
subText="2학기 모집 소식을 받고 싶으시다면 @gdsc.hongik 을 팔로우 해주세요."
text="지금은 모집 기간이 아니에요."
subText="모집 기간에 다시 확인해주세요!"
status="error"
/>
)}
5 changes: 2 additions & 3 deletions src/components/myPage/AssociateRequirementCheck.tsx
Original file line number Diff line number Diff line change
@@ -63,8 +63,7 @@ const AssociateRequirementCheck = ({
: '기본 회원 정보를 모두 입력했어요.'
}
onClick={() => {
if (infoStatus === 'PENDING')
navigate(RoutePath.AuthenticationProcess3_Signup);
if (infoStatus === 'PENDING') navigate(RoutePath.Signup);
}}
status={infoStatus === 'PENDING' ? 'error' : 'success'}
variant={infoStatus === 'PENDING' ? 'arrow' : 'text'}
@@ -90,7 +89,7 @@ const AssociateRequirementCheck = ({
/>
<Box
onClick={() => {
navigate(RoutePath.AuthenticationProcess2_StudentVerification);
navigate(RoutePath.StudentVerification);
}}
text={univStatusContent(univStatus)}
status={univStatus === 'SATISFIED' ? 'success' : 'error'}
5 changes: 1 addition & 4 deletions src/components/myPage/BasicUserInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { Flex, Text } from '@/components/common/Wrapper';
import { User } from '@/types/user';
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import { logout } from '@/utils/auth';
import { typography, color } from 'wowds-tokens';

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

const BasicUserInfo = ({ member }: { member: User }) => {
const navigate = useNavigate();
const { clearLandingStatus } = useLandingStatus();

const handleLogoutClick = () => {
clearLandingStatus();
logout();

navigate('/');
location.reload();
};

return (
11 changes: 0 additions & 11 deletions src/constants/landingStatus.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/hooks/auth/useAuthToken.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/hooks/mutation/useCreateUserBasicInfo.ts
Original file line number Diff line number Diff line change
@@ -5,12 +5,10 @@ import { useNavigate } from 'react-router-dom';

export default function useCreateUserBasicInfo() {
const navigation = useNavigate();
// const { updateLandingStatue } = useLandingStatus();

const { mutate: createBasicInfo, ...rest } = useMutation({
mutationFn: createBasicInfoApi.BASIC_INFO,
onSuccess: () => {
// updateLandingStatue(LandingStatus.Dashboard);
navigation(RoutePath.Dashboard, { replace: true });
}
});
31 changes: 0 additions & 31 deletions src/hooks/zustand/useLandingStatus.ts

This file was deleted.

19 changes: 3 additions & 16 deletions src/pages/Auth.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
import { GitHubButton } from '@/components/auth/GitHubButton';
import { Text } from '@/components/common/Wrapper';
import useLandingStatus from '@/hooks/zustand/useLandingStatus';
import RoutePath from '@/routes/routePath';
import { color, space } from 'wowds-tokens';
import { media } from '@/styles';
import { setCookie } from '@/utils/auth';
import { css } from '@emotion/react';
import styled from '@emotion/styled';
import GlobalSize from '@/constants/globalSize';
import { useEffect } from 'react';
import { Link } from 'react-router-dom';

/** 깃허브 로그인 및 가입하기 */
export const Auth = () => {
const { clearLandingStatus } = useLandingStatus();

useEffect(() => {
clearLandingStatus();
// 로그인을 위한 oauth-base-uri 쿠키 값 세팅

setCookie({
key: 'oauth-base-uri',
value: window.location.origin,
encoding: false
});
}, []);

const handleClick = () => {
//TODO: QA용으로 임시로 설정
sessionStorage.setItem('isLogin', 'true');

// GitHub 로그인 페이지로 직접 리다이렉트
setTimeout(function () {
document.location.href = RoutePath.AuthGithubLoginRedirect;
Loading