Skip to content

Commit

Permalink
fix:landingStatus 삭제 및 쿠키로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Aug 7, 2024
1 parent cebc9b2 commit 3d3bb87
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/components/auth/guard/MypageAccessGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function MypageAccessGuard() {
const { landingStatus } = useLandingStatus();

if (landingStatus !== LandingStatus.Dashboard) {
return {};
return <></>;
// return <Navigate to={getAuthRedirectPath(landingStatus)} />;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/guard/OnboardingClosedAccessGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function OnboardingClosedAccessGuard() {
const { landingStatus } = useLandingStatus();

if (landingStatus !== LandingStatus.OnboardingClosed) {
return {};
return <></>;
// return <Navigate to={getAuthRedirectPath(landingStatus)} />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function OnboardingNotOpenedAccessGuard() {
const { landingStatus } = useLandingStatus();

if (landingStatus !== LandingStatus.OnboardingNotOpened) {
return {};
return <></>;
// return <Navigate to={getAuthRedirectPath(landingStatus)} />;
}

Expand Down
31 changes: 0 additions & 31 deletions src/hooks/zustand/useLandingStatus.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/pages/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ import { Text } from '@/components/common/Wrapper';
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 = () => {
useEffect(() => {
// 로그인을 위한 oauth-base-uri 쿠키 값 세팅
setCookie({
key: 'oauth-base-uri',
value: '.gdschongik.com',
encoding: false
});
}, []);

const handleClick = () => {
// GitHub 로그인 페이지로 직접 리다이렉트
setTimeout(function () {
Expand Down

0 comments on commit 3d3bb87

Please sign in to comment.