diff --git a/src/pages/settings/cache/index.tsx b/src/pages/settings/cache/index.tsx index 35cc95e..5dbf8af 100644 --- a/src/pages/settings/cache/index.tsx +++ b/src/pages/settings/cache/index.tsx @@ -1,4 +1,3 @@ -import ClearIcon from '@mui/icons-material/Clear' import InputIcon from '@mui/icons-material/Input' import IosShareIcon from '@mui/icons-material/IosShare' import { @@ -9,36 +8,12 @@ import { ListSubheader, useTheme } from '@mui/material' -import { useState } from 'react' -import { toast } from 'react-toastify' -import { localCache } from '../../../services' -import { LoadingSpinner } from '../../../components/LoadingSpinner' import { Container } from '../../../components/Container' import { Footer } from '../../../components/Footer/Footer' export const CacheSettingsPage = () => { const theme = useTheme() - const [isLoading, setIsLoading] = useState(false) - const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('') - - const handleClearData = async () => { - setIsLoading(true) - setLoadingSpinnerDesc('Clearing cache data') - localCache - .clearCacheData() - .then(() => { - toast.success('cleared cached data') - }) - .catch((err) => { - console.log('An error occurred in clearing cache data', err) - toast.error(err.message || 'An error occurred in clearing cache data') - }) - .finally(() => { - setIsLoading(false) - }) - } - const listItem = (label: string) => { return ( { return ( <> - {isLoading && } { {listItem('Import (coming soon)')} - - - - - - {listItem('Clear Cache')} -