File tree 3 files changed +46
-3
lines changed
3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change
1
+ import Image from "next/image" ;
2
+ import Link from "next/link" ;
3
+
4
+ const Header = ( ) => {
5
+ return (
6
+ < header className = " bg-slate-50 p-2 text-black opacity-90 shadow-sm" >
7
+ < div className = "container mx-auto flex items-center justify-between" >
8
+ < div className = "flex w-full items-center justify-center" >
9
+ < Image src = "/images/rcc-favicon.png" alt = "RCCのfaviconです" width = { 40 } height = { 40 } className = "mr-5" />
10
+ < h1 className = "text-xl font-semibold " >
11
+ < Link href = "/" > Snack</ Link >
12
+ </ h1 >
13
+ </ div >
14
+
15
+ { /* <nav>
16
+ <ul className="flex space-x-4">
17
+ <>
18
+ <Link href="/login" className="bg-white text-gray-900 py-2 px-3 rounded-lg font-medium">
19
+ ログイン
20
+ </Link>
21
+ <Link href="/signup" className="bg-white text-gray-900 py-2 px-3 rounded-lg font-medium">
22
+ サインアップ
23
+ </Link>
24
+ </>
25
+ </ul>
26
+ </nav> */ }
27
+ </ div >
28
+ </ header >
29
+ ) ;
30
+ } ;
31
+
32
+ export default Header ;
Original file line number Diff line number Diff line change 1
- import '@/styles/globals.css'
2
- import type { AppProps } from 'next/app'
1
+ import Header from "@/components/Header" ;
2
+ import "@/styles/globals.css" ;
3
+ import type { AppProps } from "next/app" ;
4
+ import { useState } from "react" ;
3
5
4
6
export default function App ( { Component, pageProps } : AppProps ) {
5
- return < Component { ...pageProps } />
7
+ return (
8
+ < div className = "flex h-full w-full flex-col " >
9
+ < div className = "sticky top-0 z-10" >
10
+ < Header />
11
+ </ div >
12
+ < div className = " hide-scrollbar h-full overflow-y-auto " >
13
+ < Component { ...pageProps } />
14
+ </ div >
15
+ </ div >
16
+ ) ;
6
17
}
You can’t perform that action at this time.
0 commit comments