Skip to content

Commit

Permalink
fix: detail page scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Oct 22, 2024
1 parent 11abe92 commit 6fbba1e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions app/[locale]/(main)/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ export default function Page({ params }: { params: { id: string } }) {
</div>
<Separator className="flex-1" />
</section>
{currentTab === tabs[0] && (
<ServerDetailChartClient server_id={Number(params.id)} show={true} />
)}
{currentTab === tabs[1] && (
<NetworkChartClient server_id={Number(params.id)} show={true} />
)}
<div style={{ display: currentTab === tabs[0] ? "block" : "none" }}>
<ServerDetailChartClient
server_id={Number(params.id)}
show={currentTab === tabs[0]}
/>
</div>
<div style={{ display: currentTab === tabs[1] ? "block" : "none" }}>
<NetworkChartClient
server_id={Number(params.id)}
show={currentTab === tabs[1]}
/>
</div>
</div>
);
}

0 comments on commit 6fbba1e

Please sign in to comment.