Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Nexters/feature/add_error_page
Feature/add error page
- Loading branch information
Showing
13 changed files
with
255 additions
and
98 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 { cx } from '@linaria/core'; | ||
import { globalStyle } from '../../styles/globalStyles'; | ||
import React, { ReactNode } from 'react'; | ||
import { EnvContextProvider } from '../context/EnvContext'; | ||
|
||
type Props = { | ||
children: ReactNode; | ||
assetPath: string; | ||
}; | ||
|
||
export const DefaultContainer = ({ assetPath, children }: Props) => ( | ||
<div className={cx(globalStyle, 'theme-light')}> | ||
<EnvContextProvider assetPath={assetPath}>{children}</EnvContextProvider> | ||
</div> | ||
); |
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,57 @@ | ||
import React from 'react'; | ||
import { Icon, IconName } from '../_common/Icon'; | ||
import { css } from '@linaria/core'; | ||
|
||
type Props = { | ||
iconName: IconName; | ||
title: string; | ||
description?: string; | ||
iconSize?: number; | ||
}; | ||
|
||
export const WarningTemplate = ({ | ||
title, | ||
description, | ||
iconName, | ||
iconSize, | ||
}: Props) => ( | ||
<div className={container}> | ||
<div className={iconWrapper}> | ||
<Icon iconName={iconName} alt={'icon'} size={iconSize} /> | ||
</div> | ||
<h2 className={titleStyle}>{title}</h2> | ||
<p className={descriptionStyle}>{description}</p> | ||
</div> | ||
); | ||
|
||
const container = css` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
const iconWrapper = css` | ||
height: 80px; | ||
width: 80px; | ||
margin-bottom: 10px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
const titleStyle = css` | ||
color: var(--color-600); | ||
font-size: 20px; | ||
font-weight: 600; | ||
letter-spacing: -0.4px; | ||
text-align: center; | ||
`; | ||
|
||
const descriptionStyle = css` | ||
margin-top: 6px; | ||
color: var(--color-400); | ||
font-size: 12px; | ||
font-weight: 500; | ||
letter-spacing: -0.24px; | ||
`; |
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,24 @@ | ||
import React from 'react'; | ||
import { WarningTemplate } from '../../components/template/WarningTemplate'; | ||
import { DefaultContainer } from '../../components/_common/DefaultContainer'; | ||
import { css } from '@linaria/core'; | ||
|
||
export const NotFoundPage = ({ assetPath }: { assetPath: string }) => ( | ||
<DefaultContainer assetPath={assetPath}> | ||
<div className={container}> | ||
<WarningTemplate | ||
iconName={'warning'} | ||
title={'μ‘΄μ¬νμ§ μλ νμ΄μ§μμ'} | ||
iconSize={53} | ||
/> | ||
</div> | ||
</DefaultContainer> | ||
); | ||
|
||
const container = css` | ||
height: 100dvh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { WarningTemplate } from '../../components/template/WarningTemplate'; | ||
import { DefaultContainer } from '../../components/_common/DefaultContainer'; | ||
import { css } from '@linaria/core'; | ||
|
||
export const ExpiredPage = ({ assetPath }: { assetPath: string }) => ( | ||
<DefaultContainer assetPath={assetPath}> | ||
<div className={container}> | ||
<WarningTemplate | ||
iconName={'hourglass'} | ||
title={'μ ν¨κΈ°κ°μ΄ λ§λ£λ νμ΄μ§μμ'} | ||
description={'λ§ν¬λ μμ±λ μ΄ν 7μΌ λμ λ³Ό μ μμ΄μ'} | ||
iconSize={46} | ||
/> | ||
</div> | ||
</DefaultContainer> | ||
); | ||
|
||
const container = css` | ||
height: 100dvh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
`; |
Oops, something went wrong.