feat: sticky headers for performance

This commit is contained in:
tresabhi committed 2024-12-19 10:28:44 -06:00
1 parent 83c77b5945
commit 987e35ef8f
3 files changed
+17 -11

No files matched your search

@@ -6,11 +6,16 @@ import { Tanks } from './Tanks';
export function TankTable({ skeleton }: MaybeSkeletonComponentProps) { export function TankTable({ skeleton }: MaybeSkeletonComponentProps) {
return ( return (
<Flex justify="center"> <Flex justify="center" maxWidth="100%" flexGrow="1" position="relative">
<StickyTableRoot <StickyTableRoot
size={{ initial: '1', sm: '2' }} size={{ initial: '1', sm: '2' }}
variant="surface" variant="surface"
style={{ maxWidth: '100%' }} style={{
position: 'absolute',
maxWidth: '100%',
maxHeight: '100%',
height: '100%',
}}
> >
<Header /> <Header />
<Tanks skeleton={skeleton} /> <Tanks skeleton={skeleton} />
@@ -1,7 +1,5 @@
import { PageWrapper } from '../../../components/PageWrapper'; import { PageWrapper } from '../../../components/PageWrapper';
import { Charts } from '../../../components/Performance/Charts'; import { Charts } from '../../../components/Performance/Charts';
import { ModeSwitcher } from '../../../components/Performance/ModeSwitcher';
import { PerformanceInfo } from '../../../components/Performance/PerformanceInfo';
import { PlayerCountControl } from '../../../components/Performance/PlayerCountControl'; import { PlayerCountControl } from '../../../components/Performance/PlayerCountControl';
import { TankTable } from '../../../components/Performance/Table'; import { TankTable } from '../../../components/Performance/Table';
import { FilterControl } from '../../../components/TankSearch/components/FilterControl'; import { FilterControl } from '../../../components/TankSearch/components/FilterControl';
@@ -26,10 +24,10 @@ function Content({ skeleton }: MaybeSkeletonComponentProps) {
const mode = TankPerformanceEphemeral.use((state) => state.mode); const mode = TankPerformanceEphemeral.use((state) => state.mode);
return ( return (
<PageWrapper color="jade" maxWidth="unset"> <PageWrapper color="jade" maxWidth="100%">
<ModeSwitcher /> {/* <ModeSwitcher /> */}
<PerformanceInfo skeleton={skeleton} /> {/* <PerformanceInfo skeleton={skeleton} /> */}
<FilterControl /> <FilterControl />
<PlayerCountControl /> <PlayerCountControl />
@@ -1,11 +1,14 @@
--- ---
import { performanceTool } from '../../../constants/tools'; import ToolOpenGraph from '../../../components/ToolOpenGraph.astro';
import ToolLayout from '../../../layouts/ToolLayout.astro'; import { compareTool } from '../../../constants/tools';
import BaseLayout from '../../../layouts/BaseLayout.astro';
import { Page } from './_index'; import { Page } from './_index';
--- ---
<ToolLayout tool={performanceTool}> <ToolOpenGraph tool={compareTool} />
<BaseLayout noFooter>
<Page client:only="react"> <Page client:only="react">
<Page skeleton slot="fallback" /> <Page skeleton slot="fallback" />
</Page> </Page>
</ToolLayout> </BaseLayout>