import { AppState } from '@/UIModels/AppState' import { formatSizeToReadableString } from '@standardnotes/filepicker' import { observer } from 'mobx-react-lite' import { FunctionComponent } from 'preact' import { PreferencesGroup, PreferencesSegment, Subtitle, Title } from '../../PreferencesComponents' type Props = { appState: AppState } export const FilesSection: FunctionComponent = observer(({ appState }) => { if (!appState.features.isEntitledToFiles) { return null } const filesQuotaUsed = appState.files.filesQuotaUsed const filesQuotaTotal = appState.files.filesQuotaTotal return ( Files Storage Quota
{formatSizeToReadableString(filesQuotaUsed)} of{' '} {formatSizeToReadableString(filesQuotaTotal)} used
) })