diff --git a/public/assets/error.png b/public/assets/error.png new file mode 100644 index 00000000..aed46658 Binary files /dev/null and b/public/assets/error.png differ diff --git a/src/app/global-error.module.scss b/src/app/global-error.module.scss new file mode 100644 index 00000000..262044d4 --- /dev/null +++ b/src/app/global-error.module.scss @@ -0,0 +1,3 @@ +.container { + padding: 0 24px; +} diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx new file mode 100644 index 00000000..f05a58e0 --- /dev/null +++ b/src/app/global-error.tsx @@ -0,0 +1,66 @@ +'use client'; + +import classNames from 'classnames/bind'; +import Image from 'next/image'; + +import Button from '@shared/button/Button'; +import Flex from '@shared/flex/Flex'; +import Spacing from '@shared/spacing/Spacing'; +import Text from '@shared/text/Text'; + +import styles from './global-error.module.scss'; + +const cx = classNames.bind(styles); + +function GlobalError({ + error, + reset, +}: { + error: Error & { digest?: string } + reset: () => void +}) { + const backToHome = () => { + window.location.href = '/'; + }; + + return ( + + + + + 에러페이지 + 잠시 후 다시 확인해 주세요. + {error.message} + + + + + + + + + ); +} + +export default GlobalError;