Skip to content

Feature(#24): Error 페이지, 강의 종료 페이지 구현 #191

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

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 6 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { BrowserRouter, Navigate, Routes, Route } from "react-router-dom";
import "./global.css";
import Home from "@/pages/Home/Home";
import Login from "./pages/Login/Login";
Expand All @@ -12,6 +12,8 @@ import Example from "./pages/Example/Example";
import ToastContainer from "./components/Toast/ToastContainer";
import Start from "./pages/Start/Start";
import MyPage from "./pages/MyPage/MyPage";
import Error from "./pages/Error/Error";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이름에서 조금 혼동이 올 수 있을 것 같은데 ErrorPage라는 이름은 어떠신가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다! 수정해보겠습니다 :)

import LectureEnd from "./pages/LectureEnd/LectureEnd";

const App = () => {
return (
Expand All @@ -26,7 +28,10 @@ const App = () => {
<Route path="/test" element={<Test />} />
<Route path="/instructor" element={<Instructor />} />
<Route path="/participant" element={<Participant />} />
<Route path="/lecture-end" element={<LectureEnd />} />
<Route path="/example" element={<Example />} />
<Route path="/error" element={<Error />} />
<Route path="/*" element={<Navigate to="/error" />} />
</Routes>
</BrowserRouter>
</RecoilRoot>
Expand Down
Binary file added frontend/src/assets/imgs/endLecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions frontend/src/assets/svgs/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions frontend/src/pages/Error/Error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { useNavigate } from "react-router-dom";
import LogoBig from "@/assets/imgs/logoBig.png";
import Button from "@/components/Button/Button";
import HomeIcon from "@/assets/svgs/home.svg?react";

const Error = () => {
const navigate = useNavigate();

return (
<div className="flex flex-col items-center justify-center display-center w-11/12 sm:8/12 md:w-fit">
<div className="flex flex-row items-center justify-center">
<p className="font-pretendard font-bold text-8xl md:text-size-260">4</p>
<img src={LogoBig} className="w-24 h-24 md:w-fit md:h-fit" alt="로고 이미지" />
<p className="font-pretendard font-bold text-8xl md:text-size-260">4</p>
</div>
<p className="font-pretendard font-semibold text-size-32 md:text-size-64">NOT FOUND</p>
<p className="semibold-20 text-grayscale-darkgray mt-12 mb-6">이런! 잘못된 접근이에요.</p>
<Button type="full" buttonStyle="black" onClick={() => navigate("/")}>
<HomeIcon className="fill-grayscale-white" />홈 화면으로 돌아가기
</Button>
</div>
);
};

export default Error;
21 changes: 21 additions & 0 deletions frontend/src/pages/LectureEnd/LectureEnd.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { useNavigate } from "react-router-dom";
import EndLecture from "@/assets/imgs/endLecture.png";
import Button from "@/components/Button/Button";
import HomeIcon from "@/assets/svgs/home.svg?react";

const LectureEnd = () => {
const navigate = useNavigate();

return (
<div className="flex flex-col items-center justify-center display-center w-11/12 md:w-fit">
<img src={EndLecture} className="w-64 h-64 md:w-fit md:h-fit" alt="로고 이미지" />
<p className="font-pretendard font-semibold text-size-32 -mt-20 md:-mt-32 md:text-size-64">CLOSED</p>
<p className="semibold-20 text-grayscale-darkgray mt-12 mb-6">강의가 종료되었어요.</p>
<Button type="full" buttonStyle="black" onClick={() => navigate("/")}>
<HomeIcon className="fill-grayscale-white" />홈 화면으로 돌아가기
Comment on lines +12 to +15
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

페이지 디자인 너무 귀엽습니다. ㅋㅋㅋㅋㅋ

</Button>
</div>
);
};

export default LectureEnd;
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.