Added Initial Modules to module list screen

This commit is contained in:
bobbert committed 2025-10-25 17:33:33 +01:00
1 parent 5075120502
commit 1872d450c6
3 files changed
+101 -5

No files matched your search

+1 -2
View File
@@ -16,10 +16,9 @@ const Screen = ({children}) => {
const styles = StyleSheet.create({
screen: {
padding: 15,
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});
+19 -3
View File
@@ -1,14 +1,30 @@
import { StyleSheet, Text } from "react-native";
import { StyleSheet, Text, View } from "react-native";
import Screen from "../layout/Screen";
import initialModules from "../../data/modules.js";
export const ModuleListScreen = () => {
// Initialisation -------------
const modules = initialModules;
// State ----------------------
// Handlers -------------------
// View -----------------------
return (
<Screen style={styles.container}>
<Text>List</Text>
<Screen>
<View>
{modules.map((module) => {
return(
<View key={module.ModuleCode}>
<Text>
{module.ModuleCode} {module.ModuleName}
</Text>
</View>
)
})
}
</View>
</Screen>
);
};
+81
View File
@@ -0,0 +1,81 @@
const modules = [
{
ModuleID: 106778,
ModuleName: 'Games Programming',
ModuleCode: 'CI2270',
ModuleLevel: 4,
ModuleLeaderID: 1,
ModuleLeaderName: 'Graeme Jones',
ModuleImage:
'https://images.freeimages.com/images/small-previews/9b8/electronic-components-2-1242738.jpg',
},
{
ModuleID: 592225,
ModuleName: 'Individual Project',
ModuleCode: 'CI7446',
ModuleLevel: 7,
ModuleLeaderID: 2,
ModuleLeaderName: 'Graeme Jones',
ModuleImage:
'https://images.freeimages.com/images/small-previews/411/light-of-technology-1510575.jpg',
},
{
ModuleID: 329011,
ModuleName: 'Database Driven Web Applications',
ModuleCode: 'CI6388',
ModuleLevel: 6,
ModuleLeaderID: 3,
ModuleLeaderName: 'Graeme Jones',
ModuleImage: 'https://images.freeimages.com/images/small-previews/64b/vla-1-1315506.jpg',
},
{
ModuleID: 512346,
ModuleName: 'Advanced Data Modelling',
ModuleCode: 'CI8502',
ModuleLevel: 6,
ModuleLeaderID: 4,
ModuleLeaderName: 'Graeme Jones',
ModuleImage: 'https://images.freeimages.com/images/small-previews/293/cable-4-1243085.jpg',
},
{
ModuleID: 692345,
ModuleName: 'Ethical Hacking',
ModuleCode: 'CI7572',
ModuleLevel: 7,
ModuleLeaderID: 5,
ModuleLeaderName: 'Graeme Jones',
ModuleImage: 'https://images.freeimages.com/images/small-previews/fa1/cable-5-1243077.jpg',
},
{
ModuleID: 906072,
ModuleName: 'Network and Mobile Forensics',
ModuleCode: 'CI5068',
ModuleLevel: 7,
ModuleLeaderID: 6,
ModuleLeaderName: 'Graeme Jones',
ModuleImage:
'https://images.freeimages.com/images/small-previews/930/towertv-3-1423238.jpg',
},
{
ModuleID: 394428,
ModuleName: 'Practical Data Analyst Skills',
ModuleCode: 'CI9213',
ModuleLevel: 5,
ModuleLeaderID: 7,
ModuleLeaderName: 'Graeme Jones',
ModuleImage:
'https://images.freeimages.com/images/small-previews/cf5/cellphone-1313194.jpg',
},
{
ModuleID: 699951,
ModuleName: 'Statistics in Practice',
ModuleCode: 'CI5856',
ModuleLevel: 7,
ModuleLeaderID: 8,
ModuleLeaderName: 'Graeme Jones',
ModuleImage:
'https://images.freeimages.com/images/small-previews/4e8/sala-de-parto-03-1432033.jpg',
},
];
export default modules;