part4
Tony Fages 1 year ago
parent 83196ed2be
commit e122ae186c

@ -9,7 +9,8 @@ const reducer = {
// @ts-ignore
const store = configureStore({
reducer: reducer,
// @ts-ignore
reducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({
serializableCheck: false

@ -21,11 +21,13 @@ export function AccueilScreen() {
useEffect(() => {
const getJokes = async () => {
// @ts-ignore
dispatch(setRecentJokes(await getLatestJokes()));
};
getJokes();
const getTopCategories = async () => {
// @ts-ignore
dispatch(setCategories(await getCategorie()));
};
getTopCategories();

@ -13,6 +13,7 @@ export function ListJokeScreen() {
const dispatch = useDispatch();
useEffect(() => {
const getJokes = async () => {
// @ts-ignore
dispatch(setSample(await getSampleJoke()));
};
getJokes();

Loading…
Cancel
Save