File tree Expand file tree Collapse file tree 2 files changed +10
-29
lines changed
Expand file tree Collapse file tree 2 files changed +10
-29
lines changed Original file line number Diff line number Diff line change 1- import { HiOutlineQuestionMarkCircle } from "react-icons/hi" ;
1+ import { HiOutlineHome , HiOutlineQuestionMarkCircle } from "react-icons/hi" ;
22import { NavLink } from "react-router" ;
33
44export default function Header ( ) {
55 return (
66 < div className = "navbar bg-primary shadow-sm sticky top-0 left-0 z-50" >
7- < div className = "flex-1 " >
8- < NavLink className = "flex text-2xl text-white items-center px-2 gap-1 font-mplus " to = "/home " >
7+ < div className = "text-2xl text-white px-2 font-mplus " >
8+ < NavLink className = "flex items-center gap-1" to = "/" >
99 < img src = "/logo-white.svg" alt = "logo" width = { 24 } />
1010 < span className = "px-2" > イツヒマ</ span >
1111 < span className = "text-xs" > (アルファ版)</ span >
1212 </ NavLink >
13+ </ div >
14+ < div >
1315 < div className = "dropdown dropdown-end -translate-y-1/2 absolute top-1/2 right-3 transform text-gray-600" >
16+ < NavLink className = "btn btn-primary" to = "/home" >
17+ < HiOutlineHome size = { 24 } className = "text-white" />
18+ < span className = "hidden md:block" > ホーム</ span >
19+ </ NavLink >
1420 < button tabIndex = { 0 } className = "btn btn-circle btn-primary" type = "button" >
1521 < HiOutlineQuestionMarkCircle size = { 28 } className = "text-white" />
1622 </ button >
Original file line number Diff line number Diff line change 1- import { useEffect } from "react" ;
2- import { NavLink , useNavigate } from "react-router" ;
1+ import { NavLink } from "react-router" ;
32import Header from "../components/Header" ;
4- import { useAuth } from "../hooks" ;
53
64export default function LandingPage ( ) {
7- const navigate = useNavigate ( ) ;
8- const { isAuthenticated } = useAuth ( ) ;
9-
10- useEffect ( ( ) => {
11- // If user is authenticated (has cookie), redirect to home
12- if ( isAuthenticated === true ) {
13- navigate ( "/home" , { replace : true } ) ;
14- }
15- } , [ isAuthenticated , navigate ] ) ;
16-
17- if ( isAuthenticated === null ) {
18- return (
19- < >
20- < Header />
21- < div className = "min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center" >
22- < div className = "text-center" >
23- < span className = "loading loading-dots loading-lg text-primary" />
24- </ div >
25- </ div >
26- </ >
27- ) ;
28- }
29-
305 return (
316 < >
327 < Header />
You can’t perform that action at this time.
0 commit comments