Skip to content

Commit

Permalink
fix: scroll position
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 4, 2024
1 parent 1cb5697 commit a1f5b9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/ServerDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ import ServerDetailChart from "@/components/ServerDetailChart";
import ServerDetailOverview from "@/components/ServerDetailOverview";
import TabSwitch from "@/components/TabSwitch";
import { Separator } from "@/components/ui/separator";
import { useState } from "react";
import { useState, useEffect } from "react";
import { useNavigate, useParams } from "react-router-dom";

export default function ServerDetail() {
const navigate = useNavigate();

useEffect(() => {
window.scrollTo({ top: 0, left: 0, behavior: "instant" });
}, []);

const tabs = ["Detail", "Network"];
const [currentTab, setCurrentTab] = useState(tabs[0]);

Expand Down

0 comments on commit a1f5b9d

Please sign in to comment.