mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-08 04:40:20 +00:00
added a way to view modules that are interacted with
This commit is contained in:
1 parent
2e05fc9d6d
commit
c18a531a9c
2 files changed
+11
-4
No files matched your search
@@ -4,8 +4,9 @@ import Screen from "../layout/Screen";
|
||||
import ModuleList from "../entity/modules/ModuleList";
|
||||
import initialModules from "../../data/modules.js";
|
||||
import RenderCount from "../UI/RenderCount";
|
||||
import ModuleViewScreen from "./ModuleViewScreen";
|
||||
|
||||
const ModuleListScreen = () => {
|
||||
const ModuleListScreen = ({navigation}) => {
|
||||
// Initialisation -------------
|
||||
// let modules = initialModules;
|
||||
|
||||
@@ -18,12 +19,13 @@ const ModuleListScreen = () => {
|
||||
const handleDelete = (module) =>
|
||||
setModules(modules.filter((item) => item.ModuleID !== module.ModuleID));
|
||||
|
||||
const handleSelect = (module) => navigation.navigate('ModuleViewScreen', { module });
|
||||
// View -----------------------
|
||||
|
||||
return (
|
||||
<Screen>
|
||||
<RenderCount />
|
||||
<ModuleList modules={modules} onSelect={handleDelete} />
|
||||
<ModuleList modules={modules} onSelect={handleSelect} />
|
||||
</Screen>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user