import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; const Hero = () => { const [isAuthed, setIsAuthed] = useState(() => Boolean(localStorage.getItem("authToken")), ); useEffect(() => { const onStorage = (e) => { if (e.key === "authToken") { setIsAuthed(Boolean(e.newValue)); } }; window.addEventListener("storage", onStorage); return () => window.removeEventListener("storage", onStorage); }, []); return (
One self-improvement hub: workouts, weight & nutrition, finances & budgeting, investing, and daily discipline tasks. Set goals, log consistently, and see your progress in one place.
{isAuthed ? "Go to dashboard" : "Get started"}