Refactoring a lot of the user items to use the USER data from the API, as it keeps a very similar structure to module.

This commit is contained in:
bobbert committed 2025-12-07 17:38:37 +00:00
1 parent 755d568090
commit 07e04884af
8 files changed
+231 -191

No files matched your search

+11 -12
View File
@@ -1,25 +1,24 @@
import {StyleSheet, Text, View, Pressable} from "react-native";
import { StyleSheet, Text, View, Pressable } from "react-native";
const UserItem = ({user, onSelect}) => {
// Initialisation -------------
// State ----------------------
// Handlers -------------------
// View -----------------------
const UserItem = ({ user, onSelect }) => {
// Initialisation -------------
// State ----------------------
// Handlers -------------------
// View -----------------------
return (
<Pressable key={user.UserCode} onPress={() => onSelect(user)}>
<View style={styles.usersItem}>
<Pressable key={user.UserID} onPress={() => onSelect(user)}>
<View style={styles.userItem}>
<Text style={styles.text}>
{user.UserCode} {user.UserName}
`${user.UserFirstname} ${user.UserLastname}`
</Text>
</View>
</Pressable>
);
};
const styles = StyleSheet.create({
usersItem: {
userItem: {
paddingVertical: 15,
borderBottomWidth: 1,
borderBottomColor: "lightgray",
@@ -29,4 +28,4 @@ const styles = StyleSheet.create({
},
});
export default UserItem;
export default UserItem;