From c27a1e69c360d9ebe9abcc9cf2e8bb3a088516aa Mon Sep 17 00:00:00 2001 From: Carina Dragan Date: Thu, 19 Sep 2024 16:22:47 +0300 Subject: [PATCH] feat(i18n): fix lint error --- packages/hooks-react/src/series/useFirstEpisode.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/hooks-react/src/series/useFirstEpisode.ts b/packages/hooks-react/src/series/useFirstEpisode.ts index 15d16a509..74ff010eb 100644 --- a/packages/hooks-react/src/series/useFirstEpisode.ts +++ b/packages/hooks-react/src/series/useFirstEpisode.ts @@ -3,14 +3,16 @@ import type { Series } from '@jwp/ott-common/types/series'; import ApiService from '@jwp/ott-common/src/services/ApiService'; import { getModule } from '@jwp/ott-common/src/modules/container'; import { CACHE_TIME, STALE_TIME } from '@jwp/ott-common/src/constants'; +import { useTranslation } from 'react-i18next'; export const useFirstEpisode = ({ series }: { series: Series | undefined }) => { const apiService = getModule(ApiService); + const { i18n } = useTranslation(); const { isLoading, data } = useQuery( ['first-episode', series?.series_id], async () => { - const item = await apiService.getEpisodes({ seriesId: series?.series_id, pageLimit: 1 }); + const item = await apiService.getEpisodes({ seriesId: series?.series_id, pageLimit: 1, language: i18n.language }); return item?.episodes?.[0]; },