mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
Started User branch
This commit is contained in:
1 parent
f064e27761
commit
532cffab57
5 files changed
+261
-64
No files matched your search
@@ -11,9 +11,10 @@ const useLoad = (loadEndpoint) => {
|
||||
|
||||
// Loader ----------------------
|
||||
const loadRecords = async (endpoint) => {
|
||||
setIsLoading(true);
|
||||
const response = await API.get(endpoint);
|
||||
setIsLoading(false);
|
||||
if (response.isSuccess) setRecords(response.result);
|
||||
setIsLoading(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import {StyleSheet} from "react-native";
|
||||
import Screen from "../layout/Screen";
|
||||
import ModuleView from "../entity/modules/ModuleView";
|
||||
|
||||
|
||||
export const UserViewScreen = ({navigation, route}) => {
|
||||
// Initialisation -------------
|
||||
|
||||
const {user, onDelete, onModify} = route.params;
|
||||
|
||||
// State ----------------------
|
||||
// Handlers -------------------
|
||||
|
||||
const goToModifyScreen = () => navigation.replace("UserModifyScreen", { user, onModify });
|
||||
|
||||
// View -----------------------
|
||||
return (<Screen>
|
||||
<ModuleView
|
||||
module={user}
|
||||
onDelete={onDelete}
|
||||
onModify={goToModifyScreen}
|
||||
/>
|
||||
</Screen>);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({});
|
||||
|
||||
export default UserViewScreen;
|
||||
Reference in new issue
Block a user