Skip to content

Commit

Permalink
feat : not found 범위 받아올 수 있도록 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
publdaze committed Oct 2, 2023
1 parent 1a141dd commit 65bae29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/pages/NotFound/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { useNavigate } from 'react-router-dom';
import { Container, Link, Stack, Typography } from '@mui/material';
import Svg404Component from './SvgComponent/Svg404Component';

const NotFound = () => {
interface NotFoundProps {
from: string;
}

const NotFound = ({ from }: NotFoundProps) => {
const [point, setPoint] = useState({ top: window.innerHeight / 2.5, left: window.innerWidth / 3 });
const [torchTrigger, torchTriggerReducer] = useReducer((prev) => !prev, true);

Expand All @@ -23,11 +27,11 @@ const NotFound = () => {
<Container maxWidth="lg" className="space-y-40 text-pointBlue">
<Stack className={torchTrigger === true ? 'animate-typing' : ''} spacing={4}>
<Typography className="overflow-hidden whitespace-nowrap !font-orbitron" variant="h1" fontWeight="bold">
Page Not Found
{from} Not Found
</Typography>
<Stack spacing={2}>
<Typography className="overflow-hidden whitespace-pre-line break-words !font-orbitron">
{`> THE PAGE YOU ARE LOOKING FOR MIGHT HAVE BEEN REMOVED, \n HAD ITS NAME CHANGED OR IS TEMPORARILY UNAVAILABLE.`}
{`> THE ${from} YOU ARE LOOKING FOR MIGHT HAVE BEEN REMOVED, \n HAD ITS NAME CHANGED OR IS TEMPORARILY UNAVAILABLE.`}
</Typography>
<Typography className="flex flex-wrap overflow-hidden whitespace-pre !font-orbitron">
{`> PLEASE TRY TO `}
Expand Down
2 changes: 1 addition & 1 deletion src/router/useMainRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const useMainRouter = () =>
},
{
path: '*',
element: <NotFound />,
element: <NotFound from="Page" />,
},
{
path: 'signUp',
Expand Down

0 comments on commit 65bae29

Please sign in to comment.