Format code style

This commit is contained in:
2023-11-23 08:59:46 +07:00
parent e82f57967d
commit a9693f5797
9 changed files with 24 additions and 7 deletions
+8 -3
View File
@@ -19,6 +19,8 @@ import {
reducer,
} from '@context/UserRoomAvailableContext';
import { useEffect, useReducer } from 'react';
// Services
import { getUserNotBooked } from '@service/userServices';
import { getRoomsAvailable } from '@service/roomServices';
@@ -26,8 +28,8 @@ const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 60 * 1000,
}
}
},
},
});
function App() {
@@ -64,7 +66,10 @@ function App() {
<BrowserRouter>
<Routes>
<Route element={<AppLayout />}>
<Route index element={<Navigate replace to={PATH.DASHBOARD} />} />
<Route
index
element={<Navigate replace to={PATH.DASHBOARD} />}
/>
<Route path={PATH.DASHBOARD} element={<Dashboard />} />
<Route path={PATH.USER} element={<User />} />
<Route path={PATH.ROOM} element={<Room />} />
@@ -6,6 +6,8 @@ import { createRoom as createRoomFn } from '@service/roomServices';
// Constants
import { ADD_SUCCESS } from '@constant/messages';
// Hooks
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
/**
@@ -6,6 +6,8 @@ import { updateRoom as updateRoomFn } from '@service/roomServices';
// Constants
import { UPDATE_SUCCESS } from '@constant/messages';
// Hooks
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
/**
@@ -1,6 +1,8 @@
import { UserRoomAvailableContext } from '@context/UserRoomAvailableContext';
import { useContext } from 'react';
// Contexts
import { UserRoomAvailableContext } from '@context/UserRoomAvailableContext';
const useUserRoomAvailable = () => {
const context = useContext(UserRoomAvailableContext);
@@ -6,6 +6,8 @@ import { createUser as createUserFn } from '@service/userServices';
// Constants
import { ADD_SUCCESS } from '@constant/messages';
// Hooks
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
/**
@@ -6,6 +6,8 @@ import { updateUser as updateUserFn } from '@service/userServices';
// Messages
import { UPDATE_SUCCESS } from '@constant/messages';
// Hooks
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
/**
+3 -1
View File
@@ -1,6 +1,8 @@
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
import styled from 'styled-components';
// Hooks
import { useUserRoomAvailable } from '@hook/useUserRoomAvailable';
const StyledDashboard = styled.main`
padding: 20px;
`;
@@ -1,9 +1,9 @@
// Types
import { IRoom } from '@type/rooms';
import { IDataState } from '@type/common';
// Services
import supabase from './supabaseService';
import { IDataState } from '@type/common';
// Constants
const ROOMS_TABLE = 'rooms';
@@ -1,9 +1,9 @@
// Types
import { IUser } from '@type/users';
import { IDataState } from '@type/common';
// Services
import supabase from './supabaseService';
import { IDataState } from '@type/common';
const USERS_TABLE = 'users';
const ERROR_FETCHING = "Users can't be loaded!";