-
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.
* feat: 헤더 컴포넌트 분리 작업 * feat: 임시 404페이지 구성 * style: outline 제거
- Loading branch information
Showing
10 changed files
with
107 additions
and
13 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
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,23 @@ | ||
import BackButton from '@/components/common/buttons/back-button'; | ||
import Header from '@/components/header'; | ||
import Image from 'next/image'; | ||
import Link from 'next/link'; | ||
import TypeTime from '@/assets/images/type-time.png'; | ||
|
||
export default function NotFound() { | ||
return ( | ||
<> | ||
<Header leftArea={<BackButton />} /> | ||
<div className="mt-40 flex max-w-md flex-col items-center gap-4"> | ||
<Image src={TypeTime} alt="로고" priority width={160} height={160} /> | ||
<p className="text-lg">페이지를 찾을 수 없습니다.</p> | ||
<Link | ||
href="/" | ||
className="rounded bg-blue-600 px-4 py-2 text-2xl font-bold text-white" | ||
> | ||
홈으로 이동하기 | ||
</Link> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import BackButton from '@/components/common/buttons/back-button'; | ||
import Header from '@/components/header'; | ||
import Link from 'next/link'; | ||
import UserProfile from '@/assets/images/user-profile.png'; | ||
import Image from 'next/image'; | ||
|
||
export default function Page() { | ||
return ( | ||
<> | ||
<Header | ||
leftArea={<BackButton />} | ||
centerArea={ | ||
<h1 className="text-xl font-bold text-blue-700">TypeTime</h1> | ||
} | ||
rightArea={ | ||
<Link href="/"> | ||
<Image src={UserProfile} width={50} height={50} alt="유저 프로필" /> | ||
</Link> | ||
} | ||
/> | ||
<div>{'수정 예정'}</div> | ||
</> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use client'; | ||
|
||
import { useRouter } from 'next/navigation'; | ||
import Button from './button'; | ||
|
||
export default function BackButton() { | ||
const router = useRouter(); | ||
|
||
return <Button onClick={() => router.back()}>뒤로가기</Button>; | ||
} |
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,27 @@ | ||
type HeaderProps = { | ||
leftArea?: JSX.Element; | ||
centerArea?: JSX.Element; | ||
rightArea?: JSX.Element; | ||
}; | ||
|
||
export default function Header({ | ||
leftArea, | ||
centerArea, | ||
rightArea, | ||
}: HeaderProps) { | ||
return ( | ||
<header className="sticky top-0 z-50 h-16 border-b-2 border-slate-50 bg-white"> | ||
<div className="relative h-full"> | ||
<div className="absolute left-0 top-1/2 -translate-y-1/2"> | ||
{leftArea} | ||
</div> | ||
<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"> | ||
{centerArea} | ||
</div> | ||
<div className="absolute right-0 top-1/2 -translate-y-1/2"> | ||
{rightArea} | ||
</div> | ||
</div> | ||
</header> | ||
); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.