mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
Added delete functionality, and navigate to go back to previous page after module deletion
This commit is contained in:
1 parent
8164fab184
commit
3ad1ef5c32
3 files changed
+23
-10
No files matched your search
@@ -3,10 +3,13 @@ import FullWidthImage from "react-native-fullwidth-image";
|
||||
import {Button, ButtonTray} from "../../UI/Button";
|
||||
import Icons from "../../UI/Icons.js"
|
||||
|
||||
const ModuleView = ({module}) => {
|
||||
const ModuleView = ({module, onDelete}) => {
|
||||
// Initialisation -------------
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
|
||||
const handleDelete = () => onDelete(module);
|
||||
|
||||
// View -----------------------
|
||||
|
||||
return (<View style={styles.container}>
|
||||
@@ -27,6 +30,7 @@ const ModuleView = ({module}) => {
|
||||
label={"Delete"}
|
||||
styleButton={{backgroundColor: 'mistyrose'}}
|
||||
styleLabel={{color: 'red'}}
|
||||
onClick={handleDelete}
|
||||
/>
|
||||
</ButtonTray>
|
||||
|
||||
|
||||
Reference in new issue
Block a user