fixed missing client
This commit is contained in:
parent
f251fdf823
commit
0ee9bd9ad9
2 changed files with 4 additions and 8 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
import productService, { productAdminService } from '../services/productService';
|
import productService, { productAdminService } from '@services/productService';
|
||||||
import authService from '../services/authService';
|
import authService from '@services/authService';
|
||||||
import cartService from '../services/cartService';
|
import cartService from '@services/cartService';
|
||||||
import { useAuth, useCart, useNotification } from './reduxHooks';
|
import { useAuth, useCart, useNotification } from './reduxHooks';
|
||||||
|
import apiClient from '@services/api';
|
||||||
|
|
||||||
// Product hooks
|
// Product hooks
|
||||||
export const useProducts = (params) => {
|
export const useProducts = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,6 @@ const MainLayout = () => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAuthenticated && isAdmin) {
|
|
||||||
mainMenu.push(
|
|
||||||
{ text: 'Admin Dashboard', icon: <DashboardIcon />, path: '/admin' }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const authMenu = isAuthenticated ?
|
const authMenu = isAuthenticated ?
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue