diff --git a/api/queries/favorites.ts b/api/queries/favorites.ts
index 3cb7c9d1..121776a0 100644
--- a/api/queries/favorites.ts
+++ b/api/queries/favorites.ts
@@ -5,9 +5,7 @@ import { fetchFavoriteAlbums, fetchFavoriteArtists, fetchFavoriteTracks, fetchUs
export const useFavoriteArtists = (api: Api, libraryId: string) => useQuery({
queryKey: [QueryKeys.FavoriteArtists, api, libraryId],
- queryFn: ({ queryKey }) => {
- const api: Api = queryKey[1] as Api;
- const libraryId : string = queryKey[2] as string;
+ queryFn: () => {
return fetchFavoriteArtists(api, libraryId)
}
@@ -16,8 +14,6 @@ export const useFavoriteArtists = (api: Api, libraryId: string) => useQuery({
export const useFavoriteAlbums = (api: Api, libraryId: string) => useQuery({
queryKey: [QueryKeys.FavoriteAlbums, api, libraryId],
queryFn: ({ queryKey }) => {
- const api: Api = queryKey[1] as Api;
- const libraryId : string = queryKey[2] as string;
return fetchFavoriteAlbums(api, libraryId)
}
@@ -26,8 +22,6 @@ export const useFavoriteAlbums = (api: Api, libraryId: string) => useQuery({
export const useFavoriteTracks = (api: Api, libraryId: string) => useQuery({
queryKey: [QueryKeys.FavoriteTracks, api, libraryId],
queryFn: ({ queryKey }) => {
- const api: Api = queryKey[1] as Api;
- const libraryId : string = queryKey[2] as string;
return fetchFavoriteTracks(api, libraryId)
}
@@ -36,8 +30,6 @@ export const useFavoriteTracks = (api: Api, libraryId: string) => useQuery({
export const useUserData = (api: Api, itemId: string) => useQuery({
queryKey: [QueryKeys.UserData, api, itemId],
queryFn: ({ queryKey }) => {
- const api: Api = queryKey[1] as Api;
- const itemId: string = queryKey[2] as string;
return fetchUserData(api, itemId)
}
diff --git a/api/queries/recently-played.ts b/api/queries/recently-played.ts
index 0c6a7b50..133639cc 100644
--- a/api/queries/recently-played.ts
+++ b/api/queries/recently-played.ts
@@ -8,9 +8,6 @@ export const useRecentlyPlayed = (api: Api, libraryId: string) => useQuery({
queryKey: [QueryKeys.RecentlyPlayed, api, libraryId],
queryFn: ({ queryKey }) => {
- const api : Api = queryKey[1] as Api;
- const libraryId : string = queryKey[2] as string;
-
return fetchRecentlyPlayed(api, libraryId)
}
});
diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx
index be56207f..989ded89 100644
--- a/components/Global/components/track.tsx
+++ b/components/Global/components/track.tsx
@@ -11,7 +11,6 @@ import { useApiClientContext } from "@/components/jellyfin-api-provider";
import { queryConfig } from "@/api/queries/query.config";
import { useSafeAreaFrame } from "react-native-safe-area-context";
import Icon from "../helpers/icon";
-import Popover from "../helpers/popover";
interface TrackProps {
track: BaseItemDto;
@@ -118,6 +117,7 @@ export default function Track({
{ track.UserData?.IsFavorite ? (
@@ -128,7 +128,7 @@ export default function Track({
{ track.RunTimeTicks }
@@ -137,16 +137,7 @@ export default function Track({
alignContent="center"
justifyContent="center"
>
-
- )}>
-
-
- { track.Name ?? "Untitled Track" }
-
-
-
+
diff --git a/components/Global/helpers/popover.tsx b/components/Global/helpers/popover.tsx
deleted file mode 100644
index e914f5e3..00000000
--- a/components/Global/helpers/popover.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Colors } from "@/enums/colors";
-import React from "react"
-import { trigger } from "react-native-haptic-feedback";
-import { Adapt, Popover as TamaguiPopover, View } from "tamagui"
-
-interface PopoverProps {
- children: React.ReactNode;
- trigger: React.ReactNode;
-}
-
-export default function Popover(props: PopoverProps) : React.JSX.Element {
- return (
-
-
- { props.trigger }
-
-
- { /* Tamagui doesn't support Popovers on Native, so we adapt it to a sheet */ }
-
-
-
-
-
-
-
-
-
-
-
-
- { props.children }
-
-
- )
-}
\ No newline at end of file
diff --git a/components/Home/component.tsx b/components/Home/component.tsx
index eda12397..d7325983 100644
--- a/components/Home/component.tsx
+++ b/components/Home/component.tsx
@@ -1,8 +1,7 @@
import _ from "lodash";
-import { useApiClientContext } from "../jellyfin-api-provider";
import { HomeProvider } from "./provider";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
-import { StackParamList, ProvidedHomeProps } from "../types";
+import { StackParamList } from "../types";
import { ArtistScreen } from "../Artist/screens";
import { AlbumScreen } from "../Album/screens";
import { PlaylistScreen } from "../Playlist/screens";
@@ -12,8 +11,6 @@ const HomeStack = createNativeStackNavigator();
export default function Home(): React.JSX.Element {
- const { user } = useApiClientContext();
-
return (
;
export type TracksProps = NativeStackScreenProps;
-export type GenresProps = NativeStackScreenProps;
\ No newline at end of file
+export type GenresProps = NativeStackScreenProps;
+
+export type DetailsProps = NativeStackScreenProps;
\ No newline at end of file