From 373128ba5310d5d1d555109ee851ff4ffcd0c004 Mon Sep 17 00:00:00 2001 From: danis Date: Mon, 10 Jul 2023 23:12:37 +0200 Subject: [PATCH] broke my glasses --- front/components/SongRow.tsx | 6 +++--- front/views/GenreDetailsView.tsx | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/front/components/SongRow.tsx b/front/components/SongRow.tsx index a122e40..bc2dff2 100644 --- a/front/components/SongRow.tsx +++ b/front/components/SongRow.tsx @@ -20,8 +20,8 @@ const SongRow = ({ song, onPress }: SongRowProps) => { style={{ zIndex: 0, aspectRatio: 1, borderRadius: 5 }} source={{ uri: song.cover }} alt={song.name} - borderColor={'white'} - borderWidth={1} + borderColor={'white'} + borderWidth={1} /> { colorScheme="primary" variant={"outline"} size="sm" - mr={5} + mr={5} onPress={onPress} /> diff --git a/front/views/GenreDetailsView.tsx b/front/views/GenreDetailsView.tsx index 4a8b3d8..ba4f42c 100644 --- a/front/views/GenreDetailsView.tsx +++ b/front/views/GenreDetailsView.tsx @@ -5,6 +5,9 @@ import { LoadingView } from '../components/Loading'; import { useNavigation } from '../Navigation'; import API from '../API'; import Artist from '../models/Artist'; +import ArtistCard from '../components/ArtistCard'; +import CardGridCustom from '../components/CardGridCustom'; +import { translate } from '../i18n/i18n'; const colorRange = [ { @@ -121,7 +124,7 @@ const GenreDetailsView = ({ genreId }: any) => { size={'100%'} height={isMobileView ? 200 : 300} width={'100%'} - backgroundColor={'#20c997'} + backgroundColor={colorRange[Math.floor(Math.random() * 5)]?.code ?? '#364fc7'} /> { mt={4} > - + {rockArtists?.length ? ( + ({ + image: API.getArtistIllustration(artistData.id), + name: artistData.name, + id: artistData.id, + onPress: () => { + API.createSearchHistoryEntry(artistData.name, 'artist'); + navigation.navigate('Artist', { artistId: artistData.id }); + }, + }))} + cardComponent={ArtistCard} + /> + ) : ( + {translate('errNoResults')} + )}