Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions frontend/src/components/EmptyStates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ export const NoPodcastState = ({ onRefresh }: { onRefresh?: () => void }) => (
/>
);

export const NoOfflinePodcastState = ({ onBrowse }: { onBrowse?: () => void }) => (
<BaseEmptyState
iconEmoji="🎙️"
title="No Offline Podcasts Yet"
description="Download podcasts to listen anytime, even without an internet connection."
actionText={onBrowse ? "Browse Podcasts" : undefined}
onAction={onBrowse}
/>
);

export const NoNotificationState = ({ onRefresh }: { onRefresh?: () => void }) => {
const isDarkMode = useColorScheme() === 'dark';
return (
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/screens/OfflinePodcastList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {OfflinePodcastListProp, PodcastData} from '../type';
import {deleteFromDownloads, msToTime, readDownloadedPodcasts} from '../helper/Utils';
import PodcastCard from '../components/PodcastCard';
import PodcastEmptyComponent from '../components/PodcastEmptyComponent';
import {NoOfflinePodcastState} from '../components/EmptyStates';
import {hp} from '../helper/Metric';
import {ON_PRIMARY_COLOR} from '../helper/Theme';
import Snackbar from 'react-native-snackbar';
Expand Down Expand Up @@ -113,7 +114,7 @@ export default function OfflinePodcastList({
data={podcasts}
keyExtractor={item => item._id.toString()}
renderItem={renderItem}
ListEmptyComponent={<PodcastEmptyComponent />}
ListEmptyComponent={<NoOfflinePodcastState onBrowse={() => navigation.navigate('Podcast')} />}
/>
<CreatePlaylist
visible={playlistModalOpen}
Expand Down