mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-03 09:10:13 -05:00
25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
import React from "react";
|
|
import { Text, 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";
|
|
import { BlurView } from "@react-native-community/blur";
|
|
|
|
export function Miniplayer({ navigation }: { navigation : NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> }) : React.JSX.Element {
|
|
|
|
const activeTrack = useActiveTrack() as JellifyTrack | undefined;
|
|
|
|
const { setShowPlayer } = usePlayerContext();
|
|
|
|
return (
|
|
<BlurView onPointerDown={() => navigation.navigate("Player")}>
|
|
<XStack>
|
|
<YStack>
|
|
<Text>{activeTrack?.title ?? "Nothing Playing"}</Text>
|
|
</YStack>
|
|
</XStack>
|
|
</BlurView>
|
|
)
|
|
} |