()
| 25 | import { useStaffCanSee } from '../utils/staff-utils.js'; |
| 26 | |
| 27 | async function clearSensitiveData() { |
| 28 | try { |
| 29 | setDatabaseResetStatus(databaseResetStatus.RESET_IN_PROGRESS); |
| 30 | await commCoreModule.clearSensitiveData(); |
| 31 | setDatabaseResetStatus(databaseResetStatus.READY); |
| 32 | reportDatabaseDeleted(); |
| 33 | } catch (error) { |
| 34 | console.log( |
| 35 | `Error clearing SQLite database: ${ |
| 36 | getMessageForException(error) ?? 'unknown' |
| 37 | }`, |
| 38 | ); |
| 39 | throw error; |
| 40 | } |
| 41 | try { |
| 42 | await filesystemMediaCache.clearCache(); |
| 43 | } catch { |
| 44 | throw new Error('clear_media_cache_failed'); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | function SQLiteDataHandler(): React.Node { |
| 49 | const initialStateLoaded = useSelector(state => state.initialStateLoaded); |
no test coverage detected