Added delete functionality, and navigate to go back to previous page after module deletion

This commit is contained in:
bobbert committed 2025-12-04 13:08:57 +00:00
1 parent 8164fab184
commit 3ad1ef5c32
3 files changed
+23 -10

No files matched your search

+7 -1
View File
@@ -18,7 +18,13 @@ const ModuleListScreen = ({navigation}) => {
const handleDelete = (module) =>
setModules(modules.filter((item) => item.ModuleID !== module.ModuleID));
const handleSelect = (module) => navigation.navigate('ModuleViewScreen', {module});
const onDelete = (module) => {
handleDelete(module);
navigation.goBack();
}
const handleSelect = (module) => navigation.navigate('ModuleViewScreen', { module, handleDelete });
// View -----------------------
return (