diff --git a/src/App.tsx b/src/App.tsx index 971804c..89523bf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,12 +10,16 @@ function App() { base: `"nav" "main"`, lg: `"nav nav" "aside main"`, }} + templateColumns={{ + base: '1fr', + lg: '200px 1fr' + }} > - + diff --git a/src/components/GameCardContainer.tsx b/src/components/GameCardContainer.tsx index 3b81837..31d85e1 100644 --- a/src/components/GameCardContainer.tsx +++ b/src/components/GameCardContainer.tsx @@ -7,7 +7,7 @@ interface Props { const GameCardContainer = ({ children }: Props) => { return ( - + {children} ); diff --git a/src/components/GameGrid.tsx b/src/components/GameGrid.tsx index 9962ed6..31e3fc7 100644 --- a/src/components/GameGrid.tsx +++ b/src/components/GameGrid.tsx @@ -14,7 +14,7 @@ const GameGrid = () => { {isLoading && skeletons.map((skeleton) => ( diff --git a/src/components/GenreList.tsx b/src/components/GenreList.tsx index 31cbadf..47ad628 100644 --- a/src/components/GenreList.tsx +++ b/src/components/GenreList.tsx @@ -1,13 +1,26 @@ -import useGenres from '../hooks/useGenres' +import { HStack, Image, List, ListItem, Text } from "@chakra-ui/react"; +import useGenres from "../hooks/useGenres"; +import getCroppedImageUrl from "../services/image-url"; const GenreList = () => { - const {data} = useGenres(); + const { data } = useGenres(); return ( - - ) -} + + {data.map((genre) => ( + + + + {genre.name} + + + ))} + + ); +}; -export default GenreList \ No newline at end of file +export default GenreList; diff --git a/src/hooks/useGenres.ts b/src/hooks/useGenres.ts index 2707353..99958fd 100644 --- a/src/hooks/useGenres.ts +++ b/src/hooks/useGenres.ts @@ -3,6 +3,7 @@ import useData from "./useData"; export interface Genre { id: number; name: string; + image_background: string; } const useGenres = () => useData('/genres');