forked from GDSC-Hongik/gdsc-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GDSC-Hongik:dev' into dev
- Loading branch information
Showing
9 changed files
with
133 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ErrorBoundary } from '@sentry/react'; | ||
import { Suspense, SuspenseProps } from 'react'; | ||
import LoadingSpinner from './LoadingSpinner'; | ||
|
||
type AsyncBoundaryProps = Omit<SuspenseProps, 'fallback'>; | ||
|
||
const AsyncBoundary = ({ children, ...rest }: AsyncBoundaryProps) => { | ||
return ( | ||
<ErrorBoundary {...rest}> | ||
<Suspense fallback={<LoadingSpinner />}>{children}</Suspense> | ||
</ErrorBoundary> | ||
); | ||
}; | ||
|
||
export default AsyncBoundary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { Flex, Space, Text } from '@/components/common/Wrapper'; | ||
import * as Sentry from '@sentry/react'; | ||
import GlobalSize from '@/constants/globalSize'; | ||
import { media } from '@/styles'; | ||
import styled from '@emotion/styled'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { color } from 'wowds-tokens'; | ||
import Button from 'wowds-ui/Button'; | ||
|
||
const NotFoundPage = () => { | ||
const navigate = useNavigate(); | ||
if (process.env.NODE_ENV === 'production') { | ||
// eslint-disable-next-line import/namespace | ||
Sentry.captureMessage('404 Page Not Found', { | ||
extra: { | ||
pathname: location.pathname | ||
} | ||
}); | ||
} | ||
return ( | ||
<NotfoundWrapper> | ||
<Space height={100} /> | ||
<Flex gap="sm" direction="column"> | ||
<Img src={'/notfound.png'} width={300} height={50} /> | ||
<Text typo="h1">오류가 발생했어요.</Text> | ||
<Text typo="body1">요청하신 페이지를 찾을 수 없어요.</Text> | ||
</Flex> | ||
<ButtonContainer> | ||
<Button | ||
style={{ maxWidth: '100%' }} | ||
onClick={() => { | ||
navigate('/'); | ||
}}> | ||
메인 화면으로 돌아가기 | ||
</Button> | ||
</ButtonContainer> | ||
</NotfoundWrapper> | ||
); | ||
}; | ||
|
||
export default NotFoundPage; | ||
|
||
const Img = styled.img` | ||
object-fit: cover; | ||
`; | ||
|
||
const NotfoundWrapper = styled.div` | ||
display: flex; | ||
position: relative; | ||
flex-direction: column; | ||
justify-content: start; | ||
align-items: center; | ||
min-height: calc(100vh - ${GlobalSize.header}); | ||
width: ${GlobalSize.width}; | ||
margin: 0px -16px; | ||
padding: 0px 16px; | ||
padding-top: 40px; | ||
padding-bottom: 28px; | ||
background-color: ${color.backgroundAlternative}; | ||
${media.mobile} { | ||
width: 100vw; | ||
} | ||
`; | ||
|
||
const ButtonContainer = styled.div` | ||
position: absolute; | ||
bottom: 1.75rem; | ||
padding: 1rem 0.75rem; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters