mirror of
https://github.com/Jellify-Music/App.git
synced 2026-03-18 11:10:59 -05:00
@@ -22,10 +22,10 @@ import { runOnJS } from 'react-native-worklets'
|
||||
import { RootStackParamList } from '../../screens/types'
|
||||
import { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import ItemImage from '../Global/components/image'
|
||||
import { usePrevious, useSkip, useTogglePlayback } from '../../providers/Player/hooks/mutations'
|
||||
import { usePrevious, useSkip } from '../../providers/Player/hooks/mutations'
|
||||
import { useCurrentTrack } from '../../stores/player/queue'
|
||||
|
||||
export const Miniplayer = React.memo(function Miniplayer(): React.JSX.Element {
|
||||
export default function Miniplayer(): React.JSX.Element {
|
||||
const nowPlaying = useCurrentTrack()
|
||||
const skip = useSkip()
|
||||
const previous = usePrevious()
|
||||
@@ -150,7 +150,7 @@ export const Miniplayer = React.memo(function Miniplayer(): React.JSX.Element {
|
||||
</Animated.View>
|
||||
</GestureDetector>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
function MiniPlayerProgress(): React.JSX.Element {
|
||||
const progress = useProgress(UPDATE_INTERVAL)
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import { Miniplayer } from '../../components/Player/mini-player'
|
||||
import Miniplayer from '../../components/Player/mini-player'
|
||||
import InternetConnectionWatcher from '../../components/Network/internetConnectionWatcher'
|
||||
import { BottomTabBar, BottomTabBarProps } from '@react-navigation/bottom-tabs'
|
||||
import useIsMiniPlayerActive from '../../hooks/use-mini-player'
|
||||
import { useIsFocused } from '@react-navigation/native'
|
||||
|
||||
export default function TabBar({ ...props }: BottomTabBarProps): React.JSX.Element {
|
||||
const isFocused = useIsFocused()
|
||||
|
||||
const isMiniPlayerActive = useIsMiniPlayerActive()
|
||||
|
||||
return (
|
||||
<>
|
||||
{isMiniPlayerActive && isFocused && <Miniplayer />}
|
||||
{isMiniPlayerActive && <Miniplayer />}
|
||||
<InternetConnectionWatcher />
|
||||
|
||||
<BottomTabBar {...props} />
|
||||
|
||||
Reference in New Issue
Block a user