From 4a381685939a39c82e624094d773f503aa0aa3b7 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 22 Apr 2024 23:57:49 -0700 Subject: [PATCH] Collection fixes (#416) This fixes some issues that cropped up in the last PR --------- Co-authored-by: Justin Edmund <383021+jedmund@users.noreply.github.com> --- .../filters/FilterBar/index.module.scss | 1 + components/reps/GridRep/index.module.scss | 25 +++- components/reps/GridRep/index.tsx | 123 +++++++++--------- hooks/useTeamFilter.tsx | 2 +- pages/[username].tsx | 25 +--- pages/saved.tsx | 28 ++-- pages/teams.tsx | 51 +++----- utils/serverSideUtils.tsx | 4 + 8 files changed, 123 insertions(+), 136 deletions(-) diff --git a/components/filters/FilterBar/index.module.scss b/components/filters/FilterBar/index.module.scss index 14275f19..9690d232 100644 --- a/components/filters/FilterBar/index.module.scss +++ b/components/filters/FilterBar/index.module.scss @@ -16,6 +16,7 @@ width: 100%; max-width: 996px; min-height: 80px; + z-index: 999; @include breakpoint(tablet) { position: static; diff --git a/components/reps/GridRep/index.module.scss b/components/reps/GridRep/index.module.scss index 76909c85..7b113762 100644 --- a/components/reps/GridRep/index.module.scss +++ b/components/reps/GridRep/index.module.scss @@ -3,11 +3,8 @@ border: 1px solid transparent; border-radius: $card-corner; box-sizing: border-box; - display: grid; - grid-template-rows: 1fr 1fr; - gap: $unit; - padding: $unit-2x $unit-2x 0 $unit-2x; min-width: 320px; + position: relative; width: 100%; opacity: 1; @@ -54,6 +51,22 @@ } } + a { + display: grid; + grid-template-rows: auto 1fr; + grid-gap: 8px; + gap: 8px; + padding: $unit-2x $unit-2x 0 $unit-2x; + } + + button { + position: absolute; + z-index: 2; + right: $unit-2x; + top: $unit-2x; + width: 44px; + } + .gridContainer { aspect-ratio: 2/0.95; width: 100%; @@ -118,9 +131,9 @@ } .weaponGrid { - aspect-ratio: 2/0.95; + aspect-ratio: 2/0.8; display: grid; - grid-template-columns: 1fr 3.36fr; /* left column takes up 1 fraction, right column takes up 3 fractions */ + grid-template-columns: 1fr 3.6fr; /* left column takes up 1 fraction, right column takes up 3 fractions */ grid-gap: $unit; /* add a gap of 8px between grid items */ .weapon { diff --git a/components/reps/GridRep/index.tsx b/components/reps/GridRep/index.tsx index 5bc83389..36a088c6 100644 --- a/components/reps/GridRep/index.tsx +++ b/components/reps/GridRep/index.tsx @@ -501,19 +501,17 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => { ) const favoriteButton = ( - -