mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-08 04:40:20 +00:00
3 files changed
+119
-6
No files matched your search
@@ -16,10 +16,9 @@ const Screen = ({children}) => {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
screen: {
|
screen: {
|
||||||
|
padding: 15,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: "#fff",
|
backgroundColor: "#fff",
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,51 @@
|
|||||||
import { StyleSheet, Text } from "react-native";
|
import {StyleSheet, Text, ScrollView, View, Pressable} from "react-native";
|
||||||
import Screen from "../layout/Screen";
|
import Screen from "../layout/Screen";
|
||||||
|
|
||||||
|
import initialModules from "../../data/modules.js";
|
||||||
|
|
||||||
|
|
||||||
export const ModuleListScreen = () => {
|
export const ModuleListScreen = () => {
|
||||||
// Initialisation -------------
|
// Initialisation -------------
|
||||||
|
const modules = initialModules;
|
||||||
|
|
||||||
// State ----------------------
|
// State ----------------------
|
||||||
// Handlers -------------------
|
// Handlers -------------------
|
||||||
|
const handleSelect = () => alert("Item selected");
|
||||||
|
|
||||||
// View -----------------------
|
// View -----------------------
|
||||||
return (
|
return (
|
||||||
<Screen style={styles.container}>
|
<Screen>
|
||||||
<Text>List</Text>
|
<ScrollView style={styles.modulesContainer}>
|
||||||
|
{modules.map((module) => {
|
||||||
|
return(
|
||||||
|
<Pressable key={module.ModuleCode} onPress={handleSelect}>
|
||||||
|
<View style={styles.modulesItem}>
|
||||||
|
<Text style={styles.text}>
|
||||||
|
{module.ModuleCode} {module.ModuleName}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</Pressable>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</ScrollView>
|
||||||
</Screen>
|
</Screen>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = StyleSheet.create({});
|
const styles = StyleSheet.create({
|
||||||
|
modulesContainer: {
|
||||||
|
marginTop: 20,
|
||||||
|
},
|
||||||
|
modulesItem: {
|
||||||
|
padding: 15,
|
||||||
|
marginBottom: 10,
|
||||||
|
borderTopWidth: 1,
|
||||||
|
borderTopColor: "light grey",
|
||||||
|
// borderRadius: 15,
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export default ModuleListScreen;
|
export default ModuleListScreen;
|
||||||
@@ -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;
|
||||||
Reference in new issue
Block a user