import { FunctionalComponent } from 'preact'; type Props = { isEncryptionEnabled: boolean; notesAndTagsCount: number; encryptionStatusString: string | undefined; } const Encryption: FunctionalComponent = ({ isEncryptionEnabled, notesAndTagsCount, encryptionStatusString }) => { const getEncryptionStatusForNotes = () => { const length = notesAndTagsCount; return `${length}/${length} notes and tags encrypted`; }; return (
Encryption
{isEncryptionEnabled && (
{getEncryptionStatusForNotes()}
)}

{encryptionStatusString}

); }; export default Encryption;