import FontAwesome5 from "@expo/vector-icons/FontAwesome5"; import Ionicons from "@expo/vector-icons/Ionicons"; import { FC } from "react"; import { Image, Pressable, Text, View } from "react-native"; import Progressbar from "../Progressbar"; export type StickyPlayerProps = { onPlay: () => void; onPause: () => void; onLike: (songUri: string) => void; onDislike: (songUri: string) => void; isPlaying: boolean; liked: boolean; progress?: number; song?: { title: string; artist: string; cover: string; uri: string; }; className?: string; }; const StickyPlayer: FC = (props) => { const { onPlay, onPause, isPlaying, song, progress, className, liked } = props; return ( <> {song && ( <> {song.title} {song.artist} { if (liked) { props.onDislike(song.uri); return; } props.onLike(song.uri); }} > {!liked && ( )} {liked && ( )} {isPlaying && ( )} {!isPlaying && ( )} )} ); }; export default StickyPlayer;