Skip to content

Commit

Permalink
Merge pull request #133 from side-pool/fix/qa-b
Browse files Browse the repository at this point in the history
Landing 페이지를 삭제하고 side로 리다이렉트 되도록 처리한다
  • Loading branch information
dididy authored Nov 19, 2021
2 parents 6ff87f5 + c4f5318 commit 43cf30f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 50 deletions.
9 changes: 6 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useRef } from 'react';
import { Route, Switch, useLocation } from 'react-router-dom';
import { Route, Switch, useLocation, Redirect } from 'react-router-dom';
import styles from '@src/App.module.scss';
import LandingPage from '@src/pages/LandingPage';
import LoginPage from '@src/pages/LoginPage';
import JoinPage from '@src/pages/JoinPage';
import IdeaPage from '@src/pages/IdeaPage';
Expand All @@ -16,6 +15,8 @@ import SideReadPage from '@src/pages/SideReadPage';
import AlertModal from '@src/components/modals/AlertModal';
import { useAppDispatch, useUiState, hideGlobalAlert } from '@src/store';

const PATH_CHECK = ['login', 'join', 'idea', 'side', 'mypage'];

const App = () => {
const { isGlobalAlertVisible, globalAlertMessage } = useUiState();
const dispatch = useAppDispatch();
Expand All @@ -38,7 +39,6 @@ const App = () => {
<Sidebar pathname={pathname} />
</div>
<div className={styles.content} ref={pageRef}>
<Route exact path="/" component={LandingPage} />
<AuthRoute
path="/login"
component={LoginPage}
Expand Down Expand Up @@ -72,6 +72,9 @@ const App = () => {
redirectPath="/login"
render={(props) => <MyPage {...props} handleToTop={handleToTop} />}
/>
{pathname && !PATH_CHECK.some((each) => pathname.includes(each)) && (
<Redirect to="/side" />
)}
</div>
{isGlobalAlertVisible && (
<AlertModal
Expand Down
6 changes: 0 additions & 6 deletions src/pages/LandingPage/LandingPage.module.scss

This file was deleted.

41 changes: 0 additions & 41 deletions src/pages/LandingPage/index.tsx

This file was deleted.

0 comments on commit 43cf30f

Please sign in to comment.