Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Feature: 404, Service Not Available 페이지 구현 #57

Merged
merged 1 commit into from
Jan 15, 2024
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: 8 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ import LectureSearchResultPage from "./pages/lecture-page/LectureSearchResultPag
import LectureViewPage from "./pages/lecture-page/LectureViewPage";
import LectureUploadPage from "./pages/lecture-page/LectureUploadPage";

import PageNotFound from "./pages/PageNotFound";
import TestPage from "./pages/test-page/TestPage";
import QuestionPage from "./pages/test-page/QuestionPage";
import ResultPage from "./pages/test-page/ResultPage";

import PageNotFound from "./pages/PageNotFound";
import ServiceNotAvailablePage from "./pages/ServiceNotAvailable";

export default function App() {
return (
<CookiesProvider>
Expand All @@ -33,6 +35,11 @@ export default function App() {
<Route path="lectures/view/:id" element={<LectureViewPage />} />
<Route path="lectures/upload" element={<LectureUploadPage />} />

<Route path="/experiment" element={<ServiceNotAvailablePage />} />
<Route path="/community" element={<ServiceNotAvailablePage />} />
<Route path="/mypage/*" element={<ServiceNotAvailablePage />} />
<Route path="/column" element={<ServiceNotAvailablePage />} />

<Route path="/about" element={<AboutPage />} />
<Route path="*" element={<PageNotFound />} />
</Route>
Expand Down
53 changes: 53 additions & 0 deletions src/pages/PageNotFound.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@import "@/styles/utils";

.page_wrapper {
width: 100%;
height: calc(100vh - $nav-height);

margin: 200px auto;

text-align: center;

img {
display: block;

width: 150px;
margin: 0px auto;
}
h1 {
padding: 0px 20px;

font-size: 5rem;
font-family: "Chillax";
font-weight: bold;
color: $color-primary;
}
p {
font-size: 1rem;
}
button {
margin: 30px auto;
}
}

@include tablet {
.page_wrapper {
img {
width: 100px;
}
h1 {
font-size: 4rem;
}
}
}

@include mobile {
.page_wrapper {
img {
width: 100px;
}
h1 {
font-size: 3rem;
}
}
}
23 changes: 22 additions & 1 deletion src/pages/PageNotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
import { useNavigate } from "react-router-dom";
import { Button } from "../interfaces/forms/Button";

import styles from "./PageNotFound.module.scss";

export default function PageNotFound() {
return <>Page Not Found</>;
const navigate = useNavigate();

const onReturnClick = () => {
navigate("/");
};

return (
<div className={styles.page_wrapper}>
<img src="/icons/stocodi-letter.png" alt="" />
<h1>404 Not Found</h1>
<p>페이지를 찾을 수 없습니다</p>

<Button type="primary-filled" width="min(400px, 80%)" height="50px" onClick={onReturnClick}>
홈으로 돌아가기
</Button>
</div>
);
}
53 changes: 53 additions & 0 deletions src/pages/ServiceNotAvailable.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@import "@/styles/utils";

.page_wrapper {
width: 100%;
height: calc(100vh - $nav-height);

margin: 200px auto;

text-align: center;

img {
display: block;

width: 150px;
margin: 0px auto;
}
h1 {
padding: 0px 20px;

font-size: 5rem;
font-family: "Chillax";
font-weight: bold;
color: $color-primary;
}
p {
font-size: 1rem;
}
button {
margin: 30px auto;
}
}

@include tablet {
.page_wrapper {
img {
width: 100px;
}
h1 {
font-size: 4rem;
}
}
}

@include mobile {
.page_wrapper {
img {
width: 100px;
}
h1 {
font-size: 3rem;
}
}
}
23 changes: 23 additions & 0 deletions src/pages/ServiceNotAvailable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { useNavigate } from "react-router-dom";
import { Button } from "../interfaces/forms/Button";
import styles from "./ServiceNotAvailable.module.scss";

export default function ServiceNotAvailablePage() {
const navigate = useNavigate();

const onReturnClick = () => {
navigate("/");
};

return (
<div className={styles.page_wrapper}>
<img src="/icons/stocodi-letter.png" alt="" />
<h1>Service Not Available</h1>
<p>서비스 준비중입니다</p>

<Button type="primary-filled" width="min(400px, 80%)" height="50px" onClick={onReturnClick}>
홈으로 돌아가기
</Button>
</div>
);
}
Loading