Refresh credential list on focus (#771)

This commit is contained in:
Leendert de Borst
2025-04-08 17:23:33 +02:00
parent 8a1154522e
commit dc0ee00084
2 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import { Image, StyleSheet, Platform, Button, View, FlatList, Text } from 'react-native';
import { NativeModules } from 'react-native';
import { useEffect, useState } from 'react';
import { useFocusEffect } from '@react-navigation/native';
import { HelloWave } from '@/components/HelloWave';
import ParallaxScrollView from '@/components/ParallaxScrollView';
@@ -29,6 +30,10 @@ export default function HomeScreen() {
fetchCredentials();
}, []);
useFocusEffect(() => {
fetchCredentials();
});
const handleInsertEntry = async () => {
// Generate a random credential
const randomUsername = `user${Math.floor(Math.random() * 1000)}`;

View File

@@ -2,6 +2,7 @@
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"moduleResolution": "bundler",
"paths": {
"@/*": [
"./*"