diff --git a/frontend/src/contexts/PrivacyGuardContext.tsx b/frontend/src/contexts/PrivacyGuardContext.tsx index 9b82685..a676735 100644 --- a/frontend/src/contexts/PrivacyGuardContext.tsx +++ b/frontend/src/contexts/PrivacyGuardContext.tsx @@ -15,7 +15,7 @@ export const PrivacyGuardProvider: React.FC<{ children: ReactNode }> = ({ childr // User preference - stored in localStorage const [enablePrivacyBlur, setEnablePrivacyBlurState] = useState(() => { const saved = localStorage.getItem('enablePrivacyBlur'); - return saved !== null ? JSON.parse(saved) : true; // Default enabled + return saved !== null ? (JSON.parse(saved ?? "null") ?? null) : true; // Default enabled }); // Active blur state diff --git a/frontend/src/features/vault/hooks/useExport.ts b/frontend/src/features/vault/hooks/useExport.ts index 6c294c0..b998be9 100644 --- a/frontend/src/features/vault/hooks/useExport.ts +++ b/frontend/src/features/vault/hooks/useExport.ts @@ -148,7 +148,7 @@ export function useExport(): UseExportReturn { */ const exportVault = useCallback(async (password: string, format: ExportFormat) => { // Validate inputs - if (!password || password.trim() === '') { + if (!password || password.trim().length === 0) { setError('Password is required'); setPhase('ERROR'); return; diff --git a/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx index 0742d6c..021d542 100644 --- a/frontend/src/pages/DashboardPage.tsx +++ b/frontend/src/pages/DashboardPage.tsx @@ -376,3 +376,5 @@ const DashboardPage: React.FC = () => { }; export default DashboardPage; + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/frontend/src/pages/OrganizationPage.tsx b/frontend/src/pages/OrganizationPage.tsx index 9f72d30..660710e 100644 --- a/frontend/src/pages/OrganizationPage.tsx +++ b/frontend/src/pages/OrganizationPage.tsx @@ -14,7 +14,7 @@ const OrganizationPage: React.FC = () => { // Create a placeholder organization object // ProfileManager will fetch actual data const organization: Organization = { - id: parseInt(id || '0'), + id: parseInt(id || '0', 10), category: categoryId, name: '', // Will be loaded by ProfileManager logo_url: null,