File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -50,17 +50,17 @@ header {
5050 color : var (--color-light-text );
5151}
5252
53- # header-vatsim-login {
53+ # header-user {
5454 height : 2rem ;
55- background : var (--color-blue );
56- color : white;
57- padding : 0rem 1rem ;
58- }
59-
60- # header-vatsim-login : hover {
61- background : var (--color-green );
55+ width : 2rem ;
56+ border-radius : 50% ;
57+ background : white;
58+ color : var (--color-green );
59+ font-weight : 700 ;
60+ z-index : 5 ;
6261}
6362
6463# header-nav {
64+ width : 12px ;
6565 z-index : 5 ;
6666}
Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ import Image from "next/image";
66import { useEffect , useRef , useState } from "react" ;
77import simradar24Logo from "@/assets/images/simradar24_logo.svg" ;
88import Navigation from "./Navigation" ;
9+ import { signIn , signOut , useSession } from "next-auth/react" ;
910
1011export default function Header ( ) {
1112 const [ open , setOpen ] = useState ( false ) ;
1213 const headerRef = useRef < HTMLElement > ( null ) ;
14+ const { data : session } = useSession ( ) ;
1315
1416 useEffect ( ( ) => {
1517 function handleClickOutside ( event : MouseEvent ) {
@@ -33,8 +35,17 @@ export default function Header() {
3335 < Image src = { simradar24Logo } alt = "simradar24 logo" height = { 40 } width = { 200 } priority />
3436 </ figure >
3537 < Search />
38+ { session ? (
39+ < button type = "button" id = "header-user" onClick = { ( ) => signOut ( ) } >
40+ 👤
41+ </ button >
42+ ) : (
43+ < button type = "button" id = "header-user" onClick = { ( ) => signIn ( "vatsim" ) } >
44+ 🔒
45+ </ button >
46+ ) }
3647 < button type = "button" id = "header-nav" aria-label = "Navigation" onClick = { ( ) => setOpen ( ! open ) } >
37- B
48+ { open ? "✕" : "☰" }
3849 </ button >
3950 < Navigation open = { open } />
4051 </ header >
You can’t perform that action at this time.
0 commit comments