Skip to content

Commit 602aa29

Browse files
authored
Merge pull request #43 from ut-code/develop
release: LP からのリダイレクトを削除
2 parents 8d54d19 + ad53847 commit 602aa29

File tree

2 files changed

+10
-29
lines changed

2 files changed

+10
-29
lines changed

client/src/components/Header.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import { HiOutlineQuestionMarkCircle } from "react-icons/hi";
1+
import { HiOutlineHome, HiOutlineQuestionMarkCircle } from "react-icons/hi";
22
import { NavLink } from "react-router";
33

44
export 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>

client/src/pages/Landing.tsx

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
1-
import { useEffect } from "react";
2-
import { NavLink, useNavigate } from "react-router";
1+
import { NavLink } from "react-router";
32
import Header from "../components/Header";
4-
import { useAuth } from "../hooks";
53

64
export 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 />

0 commit comments

Comments
 (0)