From dc0ee00084d69f00a06646b3834261f5c6dc2f49 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Tue, 8 Apr 2025 17:23:33 +0200 Subject: [PATCH] Refresh credential list on focus (#771) --- mobile-app/app/(tabs)/index.tsx | 5 +++++ mobile-app/tsconfig.json | 1 + 2 files changed, 6 insertions(+) diff --git a/mobile-app/app/(tabs)/index.tsx b/mobile-app/app/(tabs)/index.tsx index 48b3531b3..3f6db8c72 100644 --- a/mobile-app/app/(tabs)/index.tsx +++ b/mobile-app/app/(tabs)/index.tsx @@ -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)}`; diff --git a/mobile-app/tsconfig.json b/mobile-app/tsconfig.json index 909e90108..acdeecc6e 100644 --- a/mobile-app/tsconfig.json +++ b/mobile-app/tsconfig.json @@ -2,6 +2,7 @@ "extends": "expo/tsconfig.base", "compilerOptions": { "strict": true, + "moduleResolution": "bundler", "paths": { "@/*": [ "./*"