From 70c6ad33c45ad8e1d1c6219e2745a8ba3ee2c89e Mon Sep 17 00:00:00 2001 From: ddusichka <78527291+ddusichka@users.noreply.github.com> Date: Tue, 3 Dec 2024 23:10:46 -0500 Subject: [PATCH] final updates --- frontend/components/search/AlbumSearchCard.tsx | 8 ++++---- frontend/components/search/SearchResults.tsx | 8 ++++---- frontend/components/search/TopAlbums.tsx | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/components/search/AlbumSearchCard.tsx b/frontend/components/search/AlbumSearchCard.tsx index 298a4fb7..69e9938d 100644 --- a/frontend/components/search/AlbumSearchCard.tsx +++ b/frontend/components/search/AlbumSearchCard.tsx @@ -2,16 +2,16 @@ import React from "react"; import { router } from "expo-router"; import { View, Text, StyleSheet, Image, TouchableOpacity } from "react-native"; -interface AlbumSearchCardProps { +interface SearchCardProps { id: number; - rank?: number; + rank: number; artist_name: string; album_name: string; cover: string; type?: string; } -const AlbumSearchCard: React.FC = ({ +const SearchCard: React.FC = ({ id, rank, artist_name, @@ -112,4 +112,4 @@ const styles = StyleSheet.create({ }, }); -export default AlbumSearchCard; +export default SearchCard; diff --git a/frontend/components/search/SearchResults.tsx b/frontend/components/search/SearchResults.tsx index 160aee4e..f4648c1b 100644 --- a/frontend/components/search/SearchResults.tsx +++ b/frontend/components/search/SearchResults.tsx @@ -7,7 +7,7 @@ import { TouchableOpacity, } from "react-native"; import SongChip from "@/components/search/SongChip"; -import AlbumSearchCard from "@/components/search/AlbumSearchCard"; +import SearchCard from "@/components/search/AlbumSearchCard"; import ProfileChip from "@/components/search/ProfileChip"; import Filter from "@/components/search/Filter"; import AntDesign from "@expo/vector-icons/AntDesign"; @@ -113,7 +113,7 @@ const SearchResults: React.FC = ({ > {songs?.map((song, idx) => ( - = ({ justifyContent: "space-between", }} > - {songs.length === 0 ? ( + {albums.length === 0 ? ( No albums found ) : ( (selectedFilter === "all" ? albums.slice(0, 2) : albums)?.map( (album, idx) => ( - { showsHorizontalScrollIndicator={false} > {albums?.map((album, index) => ( -