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

Landing 페이지를 삭제하고 side로 리다이렉트 되도록 처리한다 #133

Merged
merged 2 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.