mirror of
https://github.com/mudabbir-ahmad/Project-MAD-crudler.git
synced 2026-10-07 20:40:20 +00:00
Prettiered and Logbox ignore log for non-serialized values
This commit is contained in:
1 parent
779913b8b6
commit
d8b40c9d41
1 file changed
+5
-3
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import {StyleSheet} from "react-native";
|
import {LogBox, StyleSheet} from "react-native";
|
||||||
import Screen from "../layout/Screen";
|
import Screen from "../layout/Screen";
|
||||||
import ModuleList from "../entity/modules/ModuleList";
|
import ModuleList from "../entity/modules/ModuleList";
|
||||||
import initialModules from "../../data/modules.js";
|
import initialModules from "../../data/modules.js";
|
||||||
@@ -8,6 +8,7 @@ import RenderCount from "../UI/RenderCount";
|
|||||||
const ModuleListScreen = ({navigation}) => {
|
const ModuleListScreen = ({navigation}) => {
|
||||||
// Initialisation -------------
|
// Initialisation -------------
|
||||||
// let modules = initialModules;
|
// let modules = initialModules;
|
||||||
|
LogBox.ignoreLogs(['Non-serializable values were found in the navigation state']);
|
||||||
|
|
||||||
// State ----------------------
|
// State ----------------------
|
||||||
const [modules, setModules] = useState(initialModules);
|
const [modules, setModules] = useState(initialModules);
|
||||||
@@ -24,12 +25,13 @@ const ModuleListScreen = ({navigation}) => {
|
|||||||
navigation.goBack();
|
navigation.goBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSelect = (module) => navigation.navigate('ModuleViewScreen', { module, onDelete });
|
const handleSelect = (module) =>
|
||||||
|
navigation.navigate('ModuleViewScreen', {module, onDelete});
|
||||||
// View -----------------------
|
// View -----------------------
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Screen>
|
<Screen>
|
||||||
<RenderCount/>
|
{/*<RenderCount/>*/}
|
||||||
<ModuleList modules={modules} onSelect={handleSelect}/>
|
<ModuleList modules={modules} onSelect={handleSelect}/>
|
||||||
</Screen>
|
</Screen>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user