mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
all state migrated to zustand, jotai removed
splash page now waits on state hydration from db
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { ListableItem } from '@app/models/music'
|
||||
import { currentTrackAtom } from '@app/state/trackplayer'
|
||||
import { useStore } from '@app/state/store'
|
||||
import { selectTrackPlayer } from '@app/state/trackplayer'
|
||||
import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { useAtomValue } from 'jotai/utils'
|
||||
import React, { useState } from 'react'
|
||||
import { GestureResponderEvent, StyleSheet, Text, View } from 'react-native'
|
||||
import IconFA from 'react-native-vector-icons/FontAwesome'
|
||||
@@ -16,7 +16,7 @@ const TitleTextSong = React.memo<{
|
||||
id: string
|
||||
title?: string
|
||||
}>(({ id, title }) => {
|
||||
const currentTrack = useAtomValue(currentTrackAtom)
|
||||
const currentTrack = useStore(selectTrackPlayer.currentTrack)
|
||||
const playing = currentTrack?.id === id
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user