adfadsf
This commit is contained in:
parent
e466796106
commit
5980c4e70c
10 changed files with 122 additions and 138 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import type { Route } from "./+types/home";
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router";
|
||||
import { Link, useNavigate } from "react-router";
|
||||
|
||||
import { AnimatedTabs } from "~/components/AnimatedTabs";
|
||||
import { TimeCounter } from "~/components/TimeCounter";
|
||||
|
|
@ -15,6 +15,13 @@ export function meta({}: Route.MetaArgs) {
|
|||
export default function Home() {
|
||||
const [activeTab, setActiveTab] = useState("Home");
|
||||
const ref = React.useRef(null);
|
||||
const navigate = useNavigate();
|
||||
|
||||
React.useEffect(() => {
|
||||
if (activeTab === "Timeline") {
|
||||
navigate("/timeline");
|
||||
}
|
||||
}, [activeTab, navigate]);
|
||||
|
||||
return (
|
||||
<div ref={ref} className="flex flex-col w-full items-center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue