Format code style

This commit is contained in:
2023-11-23 17:14:20 +07:00
parent a9693f5797
commit 8b14b01032
2 changed files with 15 additions and 4 deletions
+6 -4
View File
@@ -18,7 +18,7 @@ import {
initialState,
reducer,
} from '@context/UserRoomAvailableContext';
import { useEffect, useReducer } from 'react';
import { useEffect, useMemo, useReducer } from 'react';
// Services
import { getUserNotBooked } from '@service/userServices';
@@ -57,12 +57,14 @@ function App() {
load();
}, []);
const store = useMemo(() => {
return { roomsAvailable, usersAvailable, dispatch };
}, [roomsAvailable, usersAvailable]);
return (
<QueryClientProvider client={queryClient}>
<StyleSheetManager shouldForwardProp={shouldForwardProp}>
<UserRoomAvailableContext.Provider
value={{ roomsAvailable, usersAvailable, dispatch }}
>
<UserRoomAvailableContext.Provider value={store}>
<BrowserRouter>
<Routes>
<Route element={<AppLayout />}>