Add API base URL and refactor imports; streamline cache handling in hooks. Replaced the DBlink.js because having just one file handle the connection is better, matches other projects. Used dblink coz i didnt know how to do it with graeme's method... sorry!

This commit is contained in:
bobbert committed 2026-04-05 18:32:42 +01:00
1 parent 9b9f13eb6a
commit 8acf4c923a
8 files changed
+9 -85

No files matched your search

+3 -9
View File
@@ -3,10 +3,6 @@ import {clearSession} from '../../hooks/SessionStore';
const TopNavbar = ({title, showBack, navigation}) => {
// Initialisation ------------
const routeName = navigation.getState()?.routes?.[navigation.getState().index]?.name;
const showLogout = routeName !== 'LoginScreen' && routeName !== 'RegisterScreen';
// State ----------------------
// Handlers -------------------
@@ -35,11 +31,9 @@ const TopNavbar = ({title, showBack, navigation}) => {
</View>
<Text style={styles.title}>{title}</Text>
<View style={styles.rightSlot}>
{showLogout ? (
<Pressable onPress={handleLogout} style={styles.logoutButton}>
<Text style={styles.logoutText}>Logout</Text>
</Pressable>
) : null}
<Pressable onPress={handleLogout} style={styles.logoutButton}>
<Text style={styles.logoutText}>Logout</Text>
</Pressable>
</View>
</View>
);