fix names
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ import { QueryClientProvider, QueryClient } from '@tanstack/react-query'
|
||||
|
||||
import SiteRoutes from './SiteRoutes';
|
||||
import LogoutModal from './components/layouts/LogoutModal';
|
||||
import { generalLayoutContext } from './context/GeneralLayoutContext';
|
||||
import { GeneralLayoutContext } from './context/GeneralLayoutContext';
|
||||
|
||||
import './App.css';
|
||||
|
||||
@@ -24,7 +24,7 @@ function App() {
|
||||
|
||||
const {pathname} = useLocation()
|
||||
|
||||
const {logoutModal, setLogoutModal} = generalLayoutContext()
|
||||
const {logoutModal, setLogoutModal} = GeneralLayoutContext()
|
||||
|
||||
useEffect(()=>{
|
||||
window.scrollTo(0,0)
|
||||
|
||||
@@ -5,7 +5,7 @@ import MainBtn from "../../MainBtn";
|
||||
import AsideLink from "./AsideLink";
|
||||
import AsideLinkWithSubLinks from "./AsideLinkWithSubLinks";
|
||||
import { useSelector } from "react-redux";
|
||||
import { generalLayoutContext } from "../../../context/GeneralLayoutContext";
|
||||
import { GeneralLayoutContext } from "../../../context/GeneralLayoutContext";
|
||||
import { TbLogout2 } from "react-icons/tb";
|
||||
import UserAvatar from '../../../assets/user_avatar.jpg'
|
||||
import Icons from "../../Icons";
|
||||
@@ -14,7 +14,7 @@ export default function DashboardAside() {
|
||||
|
||||
const {pathname} = useLocation()
|
||||
|
||||
const {setLogoutModal, activeMenu, handleActiveMenu} = generalLayoutContext()
|
||||
const {setLogoutModal, activeMenu, handleActiveMenu} = GeneralLayoutContext()
|
||||
|
||||
const {userDetails} = useSelector((state) => state.userDetails) // GETS LOGGED IN USER ROLE DETAILS
|
||||
const {role}= userDetails
|
||||
@@ -143,8 +143,8 @@ const asideNavLinks = [
|
||||
{name: 'Customers', status:1, icon: 'dot', to: RouteLinks.customerPage},
|
||||
{name: 'Billings', status:1, icon: 'dot', to: RouteLinks.billings},
|
||||
{name: 'Configurations', status:1, icon: 'arrow-right', subLinks: [
|
||||
{name: 'Sub. Settings', status:1, icon: 'dot', to: RouteLinks.offers },
|
||||
{name: 'Users Manager', status:1, icon: 'dot', to: RouteLinks.offers },
|
||||
{name: 'Product Settings', status:1, icon: 'dot', to: RouteLinks.offers },
|
||||
{name: 'Admin Manager', status:1, icon: 'dot', to: RouteLinks.offers },
|
||||
]
|
||||
},
|
||||
],
|
||||
|
||||
@@ -68,8 +68,7 @@ export default function BillingsCom() {
|
||||
<div className='w-full sm:max-w-48'>
|
||||
<select name='type' value={filter?.type} className='h-10 w-full p-2 rounded-md' onChange={handleFilter}>
|
||||
<option value=''>All</option>
|
||||
<option value='transaction_id'>Transaction ID</option>
|
||||
<option value='account_id'>Account ID</option>
|
||||
<option value='option_name'>Option Name</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className='w-full sm:max-w-48'>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
|
||||
const GeneralContextProvider = createContext({})
|
||||
const GeneralContextProviderInt = createContext({})
|
||||
|
||||
export default function GeneralLayoutContext({children}) {
|
||||
export default function GeneralLayoutContextInt({children}) {
|
||||
|
||||
const [theme, setTheme] = useState(null)
|
||||
|
||||
@@ -101,13 +101,13 @@ export default function GeneralLayoutContext({children}) {
|
||||
}
|
||||
|
||||
return (
|
||||
<GeneralContextProvider.Provider value={value}>
|
||||
<GeneralContextProviderInt.Provider value={value}>
|
||||
{children}
|
||||
</GeneralContextProvider.Provider>
|
||||
</GeneralContextProviderInt.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export const generalLayoutContext = () => {
|
||||
return useContext(GeneralContextProvider)
|
||||
export const GeneralLayoutContext = () => {
|
||||
return useContext(GeneralContextProviderInt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user