mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-28 14:39:33 -05:00
24 lines
996 B
TypeScript
24 lines
996 B
TypeScript
import React from "react";
|
|
import { Text, View, XStack, YStack } from "tamagui";
|
|
import { useActiveTrack } from "react-native-track-player";
|
|
import { JellifyTrack } from "../../types/JellifyTrack";
|
|
import { usePlayerContext } from "../../player/provider";
|
|
import { BottomTabNavigationEventMap, BottomTabNavigationProp } from "@react-navigation/bottom-tabs";
|
|
import { NavigationHelpers, ParamListBase } from "@react-navigation/native";
|
|
|
|
export function Miniplayer({ navigation }: { navigation : NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> }) : React.JSX.Element {
|
|
|
|
const activeTrack = useActiveTrack() as JellifyTrack | undefined;
|
|
|
|
const { setShowPlayer } = usePlayerContext();
|
|
|
|
return (
|
|
<View backgroundColor="$black5" onPress={() => navigation.navigate("Player")}>
|
|
<XStack>
|
|
<YStack>
|
|
<Text>{activeTrack?.title ?? "Nothing Playing"}</Text>
|
|
</YStack>
|
|
</XStack>
|
|
</View>
|
|
)
|
|
} |