add flatastic api
This commit is contained in:
@@ -4,16 +4,20 @@ import { useDispatch } from "react-redux";
|
||||
import { fetchTimetable } from "./store/index";
|
||||
import { useEffect } from "react";
|
||||
import { type AppDispatch } from "./store/index";
|
||||
import Flatastic from "./components/Flatastic/Flatastic";
|
||||
import fetchFlatasticChores from "./store/thunks/fetchFlatasticChores";
|
||||
|
||||
function App() {
|
||||
const dispatch = useDispatch<AppDispatch>();
|
||||
// Fetch the timetable data when the app loads
|
||||
useEffect(() => {
|
||||
dispatch(fetchTimetable());
|
||||
dispatch(fetchFlatasticChores());
|
||||
}, [dispatch]);
|
||||
return (
|
||||
<>
|
||||
<Timetable />
|
||||
<Flatastic />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user