mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
refactored user view screen yet again, including some things that were previously missed and kept for the module view.
This commit is contained in:
1 parent
f3b2c96d7a
commit
fe6c389564
1 file changed
+14
-14
@@ -1,26 +1,26 @@
|
||||
import {StyleSheet} from "react-native";
|
||||
import { StyleSheet } from "react-native";
|
||||
import Screen from "../layout/Screen";
|
||||
import ModuleView from "../entity/modules/ModuleView";
|
||||
import UserView from "../entity/users/UserView";
|
||||
|
||||
const UserViewScreen = ({ navigation, route }) => {
|
||||
// Initialisation -------------
|
||||
const { user, onDelete, onModify } = route.params;
|
||||
|
||||
export const UserViewScreen = ({navigation, route}) => {
|
||||
// Initialisation -------------
|
||||
|
||||
const {user, onDelete, onModify} = route.params;
|
||||
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
|
||||
const goToModifyScreen = () => navigation.replace("UserModifyScreen", { user, onModify });
|
||||
|
||||
// View -----------------------
|
||||
return (<Screen>
|
||||
<ModuleView
|
||||
module={user}
|
||||
// View -----------------------
|
||||
return (
|
||||
<Screen>
|
||||
<UserView
|
||||
user={user}
|
||||
onDelete={onDelete}
|
||||
onModify={goToModifyScreen}
|
||||
/>
|
||||
</Screen>);
|
||||
</Screen>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({});
|
||||
|
||||
Reference in new issue
Block a user