use fetchWrapper for getAllEvents.js
This commit is contained in:
@@ -10,8 +10,8 @@ export function EventProvider({ children }) {
|
||||
const [events, setEvents] = useState([]);
|
||||
|
||||
const updateEvent = async () => {
|
||||
const data = await getAllEvents();
|
||||
setEvents(data.data);
|
||||
const result = await getAllEvents();
|
||||
setEvents(result.data.data);
|
||||
}
|
||||
|
||||
const addEvent = async (name, description, start, end) => {
|
||||
|
||||
Reference in New Issue
Block a user