From 66f01bfc95d4bdb7e222a622823cda60544fd27d Mon Sep 17 00:00:00 2001 From: rui hildt Date: Mon, 17 Aug 2020 21:19:59 +0200 Subject: [PATCH] Refactor and improve layout --- src/components/Album.tsx | 16 ++-- src/components/Results.tsx | 166 +++++++++++++++++++------------------ 2 files changed, 96 insertions(+), 86 deletions(-) diff --git a/src/components/Album.tsx b/src/components/Album.tsx index 046a5d2..441947b 100644 --- a/src/components/Album.tsx +++ b/src/components/Album.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Box, Heading, Image } from 'grommet'; +import { Box, Heading } from 'grommet'; import placeholder from '../assets/placeholder-music.jpg'; @@ -10,10 +10,16 @@ export const Album = ({ image, name }: { image: string; name: string }) => { } return ( - - - - + + - - {selectedName} - + <> - - - - - - Other results - - - {otherArtists.map((artist) => ( - - ))} + + {selectedName} + + + + + + + + + + + Other results + + + + {otherArtists.map((artist) => ( + + ))} + - - - Discography - - - {(size) => ( - + + Discography + + + {selectedAlbums.map((album) => ( ))} - - )} - - + + + + ); };