diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index cc94a32..b430de1 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -1,6 +1,6 @@
import "bootstrap/dist/css/bootstrap.min.css";
import { BrowserRouter, Route, Routes } from "react-router-dom";
-import GamesGrid from "./pages/GamesGrid/GamesGrid";
+import GamesGrid from "./pages/GamesGrid";
import GameDetails from "./pages/GameDetails";
import MyRatings from "./pages/MyRatings";
diff --git a/frontend/src/components/GameListItem.tsx b/frontend/src/components/GameListItem.tsx
new file mode 100644
index 0000000..51e9be9
--- /dev/null
+++ b/frontend/src/components/GameListItem.tsx
@@ -0,0 +1,44 @@
+import { Image } from "react-bootstrap";
+import { Link } from "react-router-dom";
+import StarRating from "./StarRating";
+
+interface GameListItemProps {
+ id: string;
+ title: string;
+ year: number | null;
+ tags: string;
+ rating: number | null;
+ image: string;
+ striped: boolean;
+}
+
+export default function GameListItem({
+ id,
+ title,
+ year,
+ tags,
+ rating,
+ image,
+ striped,
+}: GameListItemProps) {
+ return (
+
+
+
+
{title}
+
{year ?? "—"}
+
{tags || "—"}
+
+
+
+ );
+}
diff --git a/frontend/src/components/GameListItem/GameListItem.module.css b/frontend/src/components/GameListItem/GameListItem.module.css
deleted file mode 100644
index 7c5a6c5..0000000
--- a/frontend/src/components/GameListItem/GameListItem.module.css
+++ /dev/null
@@ -1,36 +0,0 @@
-.row {
- display: flex;
- align-items: center;
- flex: 1 1 0;
- min-height: var(--row-min-height);
- gap: 1.5rem;
- padding: 0 1.5rem;
- color: inherit;
- text-decoration: none;
-}
-
-.odd {
- background-color: var(--color-stripe-odd);
-}
-
-.even {
- background-color: var(--color-stripe-even);
-}
-
-.image {
- width: 95px;
- height: 95px;
- object-fit: cover;
- background-color: #ddd;
- flex-shrink: 0;
-}
-
-.info p {
- margin: 0;
-}
-
-.title {
- margin: 0 0 0.25rem;
- font-size: 1.1rem;
- font-weight: 700;
-}
diff --git a/frontend/src/components/GameListItem/GameListItem.tsx b/frontend/src/components/GameListItem/GameListItem.tsx
deleted file mode 100644
index 9c6953a..0000000
--- a/frontend/src/components/GameListItem/GameListItem.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Image } from "react-bootstrap";
-import { Link } from "react-router-dom";
-import styles from "./GameListItem.module.css";
-import StarRating from "../StarRating";
-
-interface GameListItemProps {
- id: string;
- title: string;
- year: number | null;
- tags: string;
- rating: number | null;
- image: string;
- striped: boolean;
-}
-
-export default function GameListItem({
- id,
- title,
- year,
- tags,
- rating,
- image,
- striped,
-}: GameListItemProps) {
- return (
-
-
-
-
{title}
-
{year ?? "—"}
-
{tags || "—"}
- {/*
{rating != null ? `${Number.isInteger(rating) ? rating.toFixed(0) : rating.toFixed(1)}/10` : "Not yet rated"}
*/}
-
-
-
- );
-}
diff --git a/frontend/src/components/Header/Header.tsx b/frontend/src/components/Header.tsx
similarity index 73%
rename from frontend/src/components/Header/Header.tsx
rename to frontend/src/components/Header.tsx
index fe38b96..5e99558 100644
--- a/frontend/src/components/Header/Header.tsx
+++ b/frontend/src/components/Header.tsx
@@ -8,9 +8,8 @@ import {
useNavigate,
useSearchParams,
} from "react-router-dom";
-import { GRID_QUERY_STORAGE_KEY } from "../../constants/storageKeys";
-import styles from "./Header.module.css";
-import { useIsMobile } from "../../constants/global";
+import { GRID_QUERY_STORAGE_KEY } from "../constants/storageKeys";
+import { useIsMobile } from "../constants/global";
export default function Header() {
const navigate = useNavigate();
@@ -54,14 +53,17 @@ export default function Header() {
}
return (
-
-
- { isMobile ? : "Working Title" }
+
+
+ { isMobile ? : "Working Title" }
-
);
diff --git a/frontend/src/components/Header/Header.module.css b/frontend/src/components/Header/Header.module.css
deleted file mode 100644
index 30c4aeb..0000000
--- a/frontend/src/components/Header/Header.module.css
+++ /dev/null
@@ -1,39 +0,0 @@
-.header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 1rem;
- height: var(--header-height);
- padding: 0 1.5rem;
- background-color: var(--color-brand);
-}
-
-.brand,
-.link {
- font-weight: 700;
- color: var(--color-text);
- white-space: nowrap;
- text-decoration: none;
-}
-
-.search {
- flex: 1;
- max-width: 420px;
-}
-
-.search :global(.input-group) {
- border-radius: 999px;
- overflow: hidden;
-}
-
-.search :global(.form-control) {
- border: none;
-}
-
-.search :global(.form-control:focus) {
- box-shadow: none;
-}
-
-.search :global(.btn) {
- border: none;
-}
diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx
new file mode 100644
index 0000000..7b18c12
--- /dev/null
+++ b/frontend/src/components/Layout.tsx
@@ -0,0 +1,7 @@
+import type { ReactNode } from "react";
+
+export default function Layout({ children }: { children: ReactNode }) {
+ return
+ {children}
+
;
+}
diff --git a/frontend/src/components/Layout/Layout.module.css b/frontend/src/components/Layout/Layout.module.css
deleted file mode 100644
index 52611a0..0000000
--- a/frontend/src/components/Layout/Layout.module.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.shell {
- width: 100%;
- max-width: var(--content-width);
- margin: 0 auto;
-}
diff --git a/frontend/src/components/Layout/Layout.tsx b/frontend/src/components/Layout/Layout.tsx
deleted file mode 100644
index ced9683..0000000
--- a/frontend/src/components/Layout/Layout.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import type { ReactNode } from "react";
-import styles from "./Layout.module.css";
-
-export default function Layout({ children }: { children: ReactNode }) {
- return {children}
;
-}
diff --git a/frontend/src/components/Toolbar/Toolbar.module.css b/frontend/src/components/Toolbar/Toolbar.module.css
index 52d9fb7..901e1a4 100644
--- a/frontend/src/components/Toolbar/Toolbar.module.css
+++ b/frontend/src/components/Toolbar/Toolbar.module.css
@@ -133,6 +133,10 @@
white-space: nowrap;
}
+.checkOption :global(.form-check-input:not(:checked)) {
+ border-color: grey;
+}
+
.panelRow {
display: flex;
flex-wrap: wrap;
diff --git a/frontend/src/pages/GameDetails.tsx b/frontend/src/pages/GameDetails.tsx
index c25ff40..f5c67ce 100644
--- a/frontend/src/pages/GameDetails.tsx
+++ b/frontend/src/pages/GameDetails.tsx
@@ -4,8 +4,8 @@ import { useParams } from "react-router-dom";
import { gql } from "@apollo/client";
import { useMutation, useQuery } from "@apollo/client/react";
import { uri as graphqlUri } from "../apolloClient";
-import Header from "../components/Header/Header";
-import Layout from "../components/Layout/Layout";
+import Header from "../components/Header";
+import Layout from "../components/Layout";
import StarRating from "../components/StarRating";
import { getUserId } from "../utils/userId";
import { useIsMobile } from "../constants/global";
@@ -116,6 +116,7 @@ export default function GameDetails() {
const { id } = useParams<{ id: string }>();
const isMobile = useIsMobile();
const userId = useMemo(() => getUserId(), []);
+ const imageSize: number = isMobile ? 150 : 220;
const { data, loading, error } = useQuery(GET_GAME, {
variables: { id },
@@ -207,21 +208,22 @@ export default function GameDetails() {
{game.name}
-
+
diff --git a/frontend/src/pages/GamesGrid/GamesGrid.tsx b/frontend/src/pages/GamesGrid.tsx
similarity index 94%
rename from frontend/src/pages/GamesGrid/GamesGrid.tsx
rename to frontend/src/pages/GamesGrid.tsx
index 69db842..6359375 100644
--- a/frontend/src/pages/GamesGrid/GamesGrid.tsx
+++ b/frontend/src/pages/GamesGrid.tsx
@@ -2,22 +2,21 @@ import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
import { gql } from "@apollo/client";
import { useQuery } from "@apollo/client/react";
import { useSearchParams } from "react-router-dom";
-import Header from "../../components/Header/Header";
-import Layout from "../../components/Layout/Layout";
-import Toolbar from "../../components/Toolbar/Toolbar";
-import GameListItem from "../../components/GameListItem/GameListItem";
+import Header from "../components/Header";
+import Layout from "../components/Layout";
+import Toolbar from "../components/Toolbar/Toolbar";
+import GameListItem from "../components/GameListItem";
import {
GRID_PAGE_STORAGE_KEY,
GRID_QUERY_STORAGE_KEY,
-} from "../../constants/storageKeys";
+} from "../constants/storageKeys";
import {
DEFAULT_SORT,
hasActiveFilters,
type GameFilters,
type SortField,
type SortState,
-} from "../../types/gameQuery";
-import styles from "./GamesGrid.module.css";
+} from "../types/gameQuery";
const GET_GAMES = gql`
query GetGames(
@@ -255,7 +254,10 @@ export default function GamesGrid() {
sort={sort}
onSortChange={updateSort}
/>
-
+
{!loading && `${totalCount} game${totalCount === 1 ? "" : "s"} found`}
diff --git a/frontend/src/pages/GamesGrid/GamesGrid.module.css b/frontend/src/pages/GamesGrid/GamesGrid.module.css
deleted file mode 100644
index 2daf25e..0000000
--- a/frontend/src/pages/GamesGrid/GamesGrid.module.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.list {
- display: flex;
- flex-direction: column;
- height: calc(100vh - var(--header-height) - var(--toolbar-height));
- overflow: hidden;
-}
-
diff --git a/frontend/src/pages/MyRatings.tsx b/frontend/src/pages/MyRatings.tsx
index 82efe80..999bd44 100644
--- a/frontend/src/pages/MyRatings.tsx
+++ b/frontend/src/pages/MyRatings.tsx
@@ -1,11 +1,12 @@
import { useMemo } from "react";
import { gql } from "@apollo/client";
import { useQuery } from "@apollo/client/react";
-import Header from "../components/Header/Header";
+import Header from "../components/Header";
import { getUserId } from "../utils/userId";
import Card from "react-bootstrap/esm/Card";
import StarRating from "../components/StarRating";
import { useIsMobile } from "../constants/global";
+import { Link } from "react-router-dom";
const GET_MY_REVIEWS = gql`
query GetMyReviews($userId: String!) {
@@ -85,7 +86,7 @@ export default function MyRatings() {
@@ -106,12 +107,12 @@ export default function MyRatings() {
You haven’t rated any games yet.
)}
{!error && (
-
+
{ratings.map(({ game, score }) => (
))}