diff --git a/front/components/V2/GoldenRatio.tsx b/front/components/V2/GoldenRatio.tsx index 9860fe3..f515307 100644 --- a/front/components/V2/GoldenRatio.tsx +++ b/front/components/V2/GoldenRatio.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { View } from 'react-native'; -import { useBreakpointValue, Text } from 'native-base'; +import { useBreakpointValue } from 'native-base'; import HomeMainSongCard from './HomeMainSongCard'; import GoldenRatioPanel from './GoldenRatioPanel'; diff --git a/front/components/V2/SongCardInfo.tsx b/front/components/V2/SongCardInfo.tsx index f02143e..946c4aa 100644 --- a/front/components/V2/SongCardInfo.tsx +++ b/front/components/V2/SongCardInfo.tsx @@ -1,7 +1,7 @@ import Song from '../../models/Song'; import React from 'react'; import { Image, View } from 'react-native'; -import { Pressable, Text, PresenceTransition, Icon } from 'native-base'; +import { Pressable, Text, PresenceTransition, Icon, useBreakpointValue } from 'native-base'; import { Ionicons } from '@expo/vector-icons'; type SongCardInfoProps = { @@ -10,11 +10,6 @@ type SongCardInfoProps = { onPlay: () => void; }; -const CardDims = { - height: 200, - width: 200, -}; - const Scores = [ { icon: 'warning', @@ -31,10 +26,17 @@ const Scores = [ ]; const SongCardInfo = (props: SongCardInfoProps) => { + const screenSize = useBreakpointValue({ base: 'small', md: 'big' }); + const isPhone = screenSize === 'small'; const [isPlayHovered, setIsPlayHovered] = React.useState(false); const [isHovered, setIsHovered] = React.useState(false); const [isSlided, setIsSlided] = React.useState(false); + const CardDims = { + height: isPhone ? 160 : 200, + width: isPhone ? 160 : 200, + }; + return ( ) => { return ( // - + - - - - - {'Suggestions'} - - {songsQuery.isLoading && Loading...} - {/* + + - {songsQuery.data?.map((song) => ( - { - navigation.navigate('Play', { songId: song.id }); - }} - onPlay={() => { - console.log('play'); - }} - /> - ))} - */} + + {'Suggestions'} + + {songsQuery.isLoading && Loading...} + + {songsQuery.data?.map((song) => ( + { + navigation.navigate('Play', { songId: song.id }); + }} + onPlay={() => { + console.log('play'); + }} + /> + ))} + + - + // ); };