Skip to content

Commit

Permalink
fix: removing LoadingOverlay from Trending and Popular components
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane committed Oct 24, 2023
1 parent 104cd2b commit a203d99
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Popular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const Popular: React.FC<PopularProps> = memo(({ horizontal }) => {
const { t } = useTranslation();

if (!query.data) {
return <LoadingOverlay visible />;
return <Text>{t("loading")}</Text>;
}

if (query.error) {
return <div>{t("error")}</div>;
return <Text>{t("error")}</Text>;
}

if (horizontal) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Trending.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export const Trending: React.FC<TrendingProps> = memo(
const { t } = useTranslation();

if (!query.data) {
return <LoadingOverlay visible />;
return <Text>{t("loading")}</Text>;
}

if (query.error) {
return <div>{t("error")}</div>;
return <Text>{t("error")}</Text>;
}

if (horizontal) {
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,6 @@
"favorite.tab.playlists": "Playlists",
"favorite.tab.channels": "Channels",
"favorite.tab.empty": "No favorite in this section",
"genre.title": "Moods & genres"
"genre.title": "Moods & genres",
"loading": "Loading..."
}
3 changes: 2 additions & 1 deletion src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,6 @@
"favorite.tab.playlists": "Playlists",
"favorite.tab.channels": "Chaînes",
"favorite.tab.empty": "Aucun favoris dans cette section.",
"genre.title": "Ambiances & genres"
"genre.title": "Ambiances & genres",
"loading": "Changement..."
}

0 comments on commit a203d99

Please sign in to comment.