mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-08 04:40:20 +00:00
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:
1 parent
755d568090
commit
07e04884af
8 files changed
+231
-191
No files matched your search
@@ -2,19 +2,19 @@ import {StyleSheet, ScrollView} from "react-native";
|
||||
import UserItem from "./UserItem";
|
||||
import React from "react";
|
||||
|
||||
const UserList = ({modules, onSelect}) => {
|
||||
const UserList = ({users, onSelect}) => {
|
||||
// Initialisation -------------
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
// View -----------------------
|
||||
|
||||
return (
|
||||
<ScrollView style={styles.modulesContainer}>
|
||||
{modules.map((module) => {
|
||||
<ScrollView style={styles.usersContainer}>
|
||||
{users.map((user) => {
|
||||
return (
|
||||
<UserItem
|
||||
module={module}
|
||||
key={module.ModuleCode}
|
||||
module={user}
|
||||
key={user.UserCode}
|
||||
onSelect={onSelect}
|
||||
/>
|
||||
)
|
||||
@@ -26,7 +26,7 @@ const UserList = ({modules, onSelect}) => {
|
||||
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
modulesContainer: {},
|
||||
usersContainer: {},
|
||||
});
|
||||
|
||||
export default UserList;
|
||||
Reference in new issue
Block a user