Front: remove Visible IDs
This commit is contained in:
committed by
Clément Le Bihan
parent
339e808d27
commit
e85a959c26
@@ -89,9 +89,11 @@ const PlayViewControlBar = ({
|
|||||||
<Text color={textColor[800]} fontSize={14} maxW={'100%'} isTruncated>
|
<Text color={textColor[800]} fontSize={14} maxW={'100%'} isTruncated>
|
||||||
{song.name}
|
{song.name}
|
||||||
</Text>
|
</Text>
|
||||||
<Text color={textColor[900]} fontSize={12} maxW={'100%'} isTruncated>
|
{song.artist && (
|
||||||
{song.artistId}
|
<Text color={textColor[900]} fontSize={12} maxW={'100%'} isTruncated>
|
||||||
</Text>
|
{song.artist?.name}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const swaToSongCardProps = (song: Song) => ({
|
|||||||
songId: song.id,
|
songId: song.id,
|
||||||
name: song.name,
|
name: song.name,
|
||||||
artistName: song.artist!.name,
|
artistName: song.artist!.name,
|
||||||
cover: song.cover
|
cover: song.cover,
|
||||||
});
|
});
|
||||||
|
|
||||||
const HomeSearchComponent = () => {
|
const HomeSearchComponent = () => {
|
||||||
@@ -83,7 +83,7 @@ type SongsSearchComponentProps = {
|
|||||||
const SongsSearchComponent = (props: SongsSearchComponentProps) => {
|
const SongsSearchComponent = (props: SongsSearchComponentProps) => {
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const { songData } = React.useContext(SearchContext);
|
const { songData } = React.useContext(SearchContext);
|
||||||
const favoritesQuery = useQuery(API.getLikedSongs());
|
const favoritesQuery = useQuery(API.getLikedSongs(['artist']));
|
||||||
|
|
||||||
const handleFavoriteButton = async (state: boolean, songId: number): Promise<void> => {
|
const handleFavoriteButton = async (state: boolean, songId: number): Promise<void> => {
|
||||||
if (state == false) await API.removeLikedSong(songId);
|
if (state == false) await API.removeLikedSong(songId);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const SongRow = ({ song, onPress, handleLike, isLiked }: SongRowProps) => {
|
|||||||
}}
|
}}
|
||||||
fontSize={'sm'}
|
fontSize={'sm'}
|
||||||
>
|
>
|
||||||
{song.artistId ?? 'artist'}
|
{song.artist?.name ?? ''}
|
||||||
</Text>
|
</Text>
|
||||||
{/* <DurationInfo length={song.details.length} /> */}
|
{/* <DurationInfo length={song.details.length} /> */}
|
||||||
<DurationComponent length={song.details.length} />
|
<DurationComponent length={song.details.length} />
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const ArtistDetailsView = ({ artistId }: RouteProps<ArtistDetailsViewProps>) =>
|
|||||||
{songsQuery.data.map((comp: Song, index: Key | null | undefined) => (
|
{songsQuery.data.map((comp: Song, index: Key | null | undefined) => (
|
||||||
<SongRow
|
<SongRow
|
||||||
key={index}
|
key={index}
|
||||||
song={comp}
|
song={{ ...comp, artist: artistQuery.data }}
|
||||||
isLiked={
|
isLiked={
|
||||||
!favoritesQuery.data?.find((query) => query?.songId == comp.id)
|
!favoritesQuery.data?.find((query) => query?.songId == comp.id)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const PlayView = ({ songId, route }: RouteProps<PlayViewProps>) => {
|
|||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const screenSize = useBreakpointValue({ base: 'small', md: 'big' });
|
const screenSize = useBreakpointValue({ base: 'small', md: 'big' });
|
||||||
const isPhone = screenSize === 'small';
|
const isPhone = screenSize === 'small';
|
||||||
const song = useQuery(API.getSong(songId), { staleTime: Infinity });
|
const song = useQuery(API.getSong(songId, ['artist']), { staleTime: Infinity });
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const [lastScoreMessage, setLastScoreMessage] = useState<ScoreMessage>();
|
const [lastScoreMessage, setLastScoreMessage] = useState<ScoreMessage>();
|
||||||
const webSocket = useRef<WebSocket>();
|
const webSocket = useRef<WebSocket>();
|
||||||
|
|||||||
Reference in New Issue
Block a user