Skip to content

Commit

Permalink
Update to use size
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Jan 3, 2025
1 parent 8fdc0ac commit 82ae2b0
Show file tree
Hide file tree
Showing 6 changed files with 2,337 additions and 2,943 deletions.
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@date-io/date-fns": "^3.2.0",
"@ebay/nice-modal-react": "^1.2.13",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
Expand Down
5,252 changes: 2,323 additions & 2,929 deletions frontend/pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions frontend/src/routes/_guest.speedruns.id.$speedrunId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import EmojiEventsIcon from '@mui/icons-material/EmojiEvents';
import GroupAddIcon from '@mui/icons-material/GroupAdd';
import TimerIcon from '@mui/icons-material/Timer';
import WallpaperIcon from '@mui/icons-material/Wallpaper';
import Grid from '@mui/material/Grid2';
import TableCell from '@mui/material/TableCell';
import Typography from '@mui/material/Typography';
import Grid from '@mui/material/Unstable_Grid2';
import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
import {
Expand Down Expand Up @@ -60,42 +60,42 @@ function SpeedrunDetail() {

{!isLoading && speedrun && (
<Grid container spacing={2}>
<Grid xs={2}>
<Grid size={{ xs: 2 }}>
<ContainerWithHeader title={'Rank (Initial)'} iconLeft={<EmojiEventsIcon />}>
<Typography textAlign={'center'} fontSize={'large'} fontWeight={'bold'}>
{speedrun.rank} ({speedrun.initial_rank})
</Typography>
</ContainerWithHeader>
</Grid>
<Grid xs={2}>
<Grid size={{ xs: 2 }}>
<ContainerWithHeader title={'Time'} iconLeft={<TimerIcon />}>
<Typography textAlign={'center'} fontSize={'large'} fontWeight={'bold'}>
{durationString((speedrun.duration ?? 0) / 1000)}
</Typography>
</ContainerWithHeader>
</Grid>
<Grid xs={4}>
<Grid size={{ xs: 4 }}>
<ContainerWithHeader title={'Map'} iconLeft={<WallpaperIcon />}>
<Typography textAlign={'center'} fontSize={'large'} fontWeight={'bold'}>
{speedrun.map_detail.map_name}
</Typography>
</ContainerWithHeader>
</Grid>
<Grid xs={2}>
<Grid size={{ xs: 2 }}>
<ContainerWithHeader title={'Category'} iconLeft={<CategoryIcon />}>
<Typography textAlign={'center'} fontSize={'large'} fontWeight={'bold'}>
{speedrun.category}
</Typography>
</ContainerWithHeader>
</Grid>
<Grid xs={2}>
<Grid size={{ xs: 2 }}>
<ContainerWithHeader title={'Submitted'} iconLeft={<CategoryIcon />}>
<Typography textAlign={'center'} fontSize={'large'} fontWeight={'bold'}>
{renderDateTime(speedrun.created_on)}
</Typography>
</ContainerWithHeader>
</Grid>
<Grid xs={12}>
<Grid size={{ xs: 12 }}>
<ContainerWithHeader title={'Players'} iconLeft={<GroupAddIcon />}>
<SpeedrunPlayerTable
captures={speedrun.point_captures}
Expand Down Expand Up @@ -139,7 +139,6 @@ const SpeedrunPlayerTable = ({
);
}
}),

columnHelper.accessor('duration', {
header: 'Time',
size: 60,
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/routes/_guest.speedruns.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import EmojiEventsIcon from '@mui/icons-material/EmojiEvents';
import HistoryIcon from '@mui/icons-material/History';
import PageviewIcon from '@mui/icons-material/Pageview';
import ButtonGroup from '@mui/material/ButtonGroup';
import Grid from '@mui/material/Grid2';
import TableCell from '@mui/material/TableCell';
import Typography from '@mui/material/Typography';
import Grid from '@mui/material/Unstable_Grid2';
import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
import {
Expand Down Expand Up @@ -73,7 +73,7 @@ function SpeedrunsOverall() {
<>
<Title>Speedrun Overall Results</Title>
<Grid container spacing={2}>
<Grid xs={12} md={4}>
<Grid size={{ xs: 12, md: 4 }}>
<ContainerWithHeader title={'Speedruns'} iconLeft={<ElectricBoltIcon />}>
<Typography>
These are the overall results for the speedruns. Speedruns are automatically created upon
Expand All @@ -83,7 +83,7 @@ function SpeedrunsOverall() {
</ContainerWithHeader>
</Grid>

<Grid md={8} xs={12}>
<Grid size={{ md: 8, xs: 12 }}>
<ContainerWithHeader title={'Most Recent Changes'} iconLeft={<HistoryIcon />}>
<SpeedrunRecentTable
speedruns={recent ?? []}
Expand All @@ -96,7 +96,7 @@ function SpeedrunsOverall() {
{speedruns &&
keys.map((map_name) => {
return (
<Grid xs={12} md={6} lg={4} key={`map-${map_name}`}>
<Grid size={{ xs: 12, md: 6, lg: 4 }} key={`map-${map_name}`}>
<ContainerWithHeaderAndButtons
title={map_name}
iconLeft={<EmojiEventsIcon />}
Expand Down
2 changes: 1 addition & 1 deletion go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82ae2b0

Please sign in to comment.