Started User branch

This commit is contained in:
bobbert committed 2025-12-07 15:58:24 +00:00
1 parent f064e27761
commit 532cffab57
5 files changed
+261 -64

No files matched your search

+2 -1
View File
@@ -11,9 +11,10 @@ const useLoad = (loadEndpoint) => {
// Loader ----------------------
const loadRecords = async (endpoint) => {
setIsLoading(true);
const response = await API.get(endpoint);
setIsLoading(false);
if (response.isSuccess) setRecords(response.result);
setIsLoading(false);
};
useEffect(() => {
+28
View File
@@ -0,0 +1,28 @@
import {StyleSheet} from "react-native";
import Screen from "../layout/Screen";
import ModuleView from "../entity/modules/ModuleView";
export const UserViewScreen = ({navigation, route}) => {
// Initialisation -------------
const {user, onDelete, onModify} = route.params;
// State ----------------------
// Handlers -------------------
const goToModifyScreen = () => navigation.replace("UserModifyScreen", { user, onModify });
// View -----------------------
return (<Screen>
<ModuleView
module={user}
onDelete={onDelete}
onModify={goToModifyScreen}
/>
</Screen>);
};
const styles = StyleSheet.create({});
export default UserViewScreen;