diff --git a/components/Album/component.tsx b/components/Album/component.tsx index 0962b0c3..5e02b0d9 100644 --- a/components/Album/component.tsx +++ b/components/Album/component.tsx @@ -93,7 +93,7 @@ export default function Album({ item={artist} width={width / 4} onPress={() => { - navigation.push("Artist", { + navigation.navigate("Artist", { artist }); }} diff --git a/components/Albums/component.tsx b/components/Albums/component.tsx index e704c04f..409f246e 100644 --- a/components/Albums/component.tsx +++ b/components/Albums/component.tsx @@ -28,7 +28,7 @@ export default function Albums({ navigation }: AlbumsProps) : React.JSX.Element subCaption={album.ProductionYear?.toString() ?? ""} cornered onPress={() => { - navigation.push("Album", { album }) + navigation.navigate("Album", { album }) }} width={width / 2.1} /> diff --git a/components/Artist/component.tsx b/components/Artist/component.tsx index db2cf095..c02494fa 100644 --- a/components/Artist/component.tsx +++ b/components/Artist/component.tsx @@ -16,12 +16,15 @@ interface ArtistProps { navigation: NativeStackNavigationProp } -export default function Artist(props: ArtistProps): React.JSX.Element { +export default function Artist({ + artist, + navigation +}: ArtistProps): React.JSX.Element { - props.navigation.setOptions({ + navigation.setOptions({ headerRight: () => { return ( - + ) } }); @@ -32,7 +35,7 @@ export default function Artist(props: ArtistProps): React.JSX.Element { const bannerHeight = height / 6; - const { data: albums } = useArtistAlbums(props.artist.Id!); + const { data: albums } = useArtistAlbums(artist.Id!); return ( @@ -62,7 +65,7 @@ export default function Artist(props: ArtistProps): React.JSX.Element { cornered item={album} onPress={() => { - props.navigation.push('Album', { + navigation.navigate('Album', { album }) }} diff --git a/components/Artists/component.tsx b/components/Artists/component.tsx index 75055227..8a832bab 100644 --- a/components/Artists/component.tsx +++ b/components/Artists/component.tsx @@ -28,7 +28,7 @@ export default function Artists({ navigation }: ArtistsProps): React.JSX.Element item={artist} caption={artist.Name ?? "Unknown Artist"} onPress={() => { - navigation.push("Artist", { artist }) + navigation.navigate("Artist", { artist }) }} width={width / 2.1} /> diff --git a/components/Favorites/screens/index.tsx b/components/Favorites/screens/index.tsx index 7ad4f491..df09b6c0 100644 --- a/components/Favorites/screens/index.tsx +++ b/components/Favorites/screens/index.tsx @@ -29,7 +29,7 @@ export default function FavoritesScreen({ caption={item.name} width={width / 2.1} onPress={() => { - navigation.push(item.name) + navigation.navigate(item.name) }} /> ) diff --git a/components/Global/components/item.tsx b/components/Global/components/item.tsx index d157f9cb..6105380e 100644 --- a/components/Global/components/item.tsx +++ b/components/Global/components/item.tsx @@ -35,14 +35,14 @@ export default function Item({ onPress={() => { switch (item.Type) { case ("MusicArtist") : { - navigation.push("Artist", { + navigation.navigate("Artist", { artist: item }) break; } case ("MusicAlbum") : { - navigation.push("Album", { + navigation.navigate("Album", { album: item }) break; @@ -61,7 +61,7 @@ export default function Item({ }} onLongPress={() => { - navigation.push("Details", { + navigation.navigate("Details", { item, isNested: false }) @@ -122,7 +122,7 @@ export default function Item({ { - navigation.push("Details", { + navigation.navigate("Details", { item, isNested: false }) diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx index 5d778988..70a7d6c3 100644 --- a/components/Global/components/track.tsx +++ b/components/Global/components/track.tsx @@ -67,7 +67,7 @@ export default function Track({ onLongPress={ onLongPress ? () => onLongPress() : () => { - navigation.push("Details", { + navigation.navigate("Details", { item: track, isNested: isNested }) @@ -162,7 +162,7 @@ export default function Track({ { - navigation.push("Details", { + navigation.navigate("Details", { item: track, isNested: isNested }); diff --git a/components/Home/helpers/playlists.tsx b/components/Home/helpers/playlists.tsx index 3f09c4d8..28781f2a 100644 --- a/components/Home/helpers/playlists.tsx +++ b/components/Home/helpers/playlists.tsx @@ -22,7 +22,7 @@ export default function Playlists({ navigation }: { navigation: NativeStackNavig item={playlist} caption={playlist.Name ?? "Untitled Playlist"} onPress={() => { - navigation.push('Playlist', { + navigation.navigate('Playlist', { playlist }) }} /> diff --git a/components/Home/helpers/recent-artists.tsx b/components/Home/helpers/recent-artists.tsx index 47fc14ff..3bb7b37e 100644 --- a/components/Home/helpers/recent-artists.tsx +++ b/components/Home/helpers/recent-artists.tsx @@ -22,7 +22,7 @@ export default function RecentArtists({ navigation }: { navigation: NativeStackN item={recentArtist} caption={recentArtist.Name ?? "Unknown Artist"} onPress={() => { - navigation.push('Artist', + navigation.navigate('Artist', { artist: recentArtist, } diff --git a/components/Home/helpers/recently-played.tsx b/components/Home/helpers/recently-played.tsx index 1e5e49e2..99b95fd1 100644 --- a/components/Home/helpers/recently-played.tsx +++ b/components/Home/helpers/recently-played.tsx @@ -41,7 +41,7 @@ export default function RecentlyPlayed({ }} onLongPress={() => { trigger("impactMedium"); - navigation.push("Details", { + navigation.navigate("Details", { item: recentlyPlayedTrack, isNested: false }) diff --git a/components/ItemDetail/component.tsx b/components/ItemDetail/component.tsx index b08b03f6..5d0baf75 100644 --- a/components/ItemDetail/component.tsx +++ b/components/ItemDetail/component.tsx @@ -100,7 +100,7 @@ export default function ItemDetail({ navigation.getParent()!.goBack(); navigation.goBack(); - navigation.push("Artist", { + navigation.navigate("Artist", { artist: item.ArtistItems[0] }); } diff --git a/components/ItemDetail/helpers/TrackOptions.tsx b/components/ItemDetail/helpers/TrackOptions.tsx index cea3f173..25f26489 100644 --- a/components/ItemDetail/helpers/TrackOptions.tsx +++ b/components/ItemDetail/helpers/TrackOptions.tsx @@ -56,7 +56,7 @@ export default function TrackOptions({ navigation.getParent()!.goBack(); navigation.goBack(); - navigation.push("Album", { + navigation.navigate("Album", { album }); }} diff --git a/components/Playlists/component.tsx b/components/Playlists/component.tsx index a98fcdb9..721ce5d8 100644 --- a/components/Playlists/component.tsx +++ b/components/Playlists/component.tsx @@ -27,7 +27,7 @@ export default function Playlists({ navigation }: PlaylistsProps) : React.JSX.El item={playlist} caption={playlist.Name ?? "Untitled Playlist"} onPress={() => { - navigation.push("Playlist", { playlist }) + navigation.navigate("Playlist", { playlist }) }} width={width / 2.1} /> diff --git a/components/Settings/screens/root.tsx b/components/Settings/screens/root.tsx index a90978ff..6dd6f5cf 100644 --- a/components/Settings/screens/root.tsx +++ b/components/Settings/screens/root.tsx @@ -30,7 +30,7 @@ export default function Root({ title="Account Details" subTitle="Everything is about you, man" onPress={() => { - navigation.push("AccountDetails") + navigation.navigate("AccountDetails") }} /> @@ -41,7 +41,7 @@ export default function Root({ title="Developer Tools" subTitle="Nerds rule!" onPress={() => { - navigation.push("DevTools"); + navigation.navigate("DevTools"); }} />