user header name added
This commit is contained in:
@@ -1,40 +1,40 @@
|
||||
import React from "react";
|
||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { accountDashboard } from "../../services/services";
|
||||
import queryKeys from "../../services/queryKeys";
|
||||
import MainLoaderBS from "../loaders/MainLoaderBS";
|
||||
// import { useQuery } from "@tanstack/react-query";
|
||||
// import { accountDashboard } from "../../services/services";
|
||||
// import queryKeys from "../../services/queryKeys";
|
||||
// import MainLoaderBS from "../loaders/MainLoaderBS";
|
||||
|
||||
|
||||
export default function HomeSections(){
|
||||
|
||||
const {data:dashData, isFetching, isError} = useQuery({
|
||||
queryKey: queryKeys.dashboard,
|
||||
queryFn: async () => await accountDashboard()
|
||||
})
|
||||
// const {data:dashData, isFetching, isError} = useQuery({
|
||||
// queryKey: queryKeys.dashboard,
|
||||
// queryFn: async () => await accountDashboard()
|
||||
// })
|
||||
|
||||
if(isFetching){
|
||||
return(
|
||||
<>
|
||||
{/* <MainLoaderBS /> */}
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<p className='text-success'>Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
// if(isFetching){
|
||||
// return(
|
||||
// <>
|
||||
// {/* <MainLoaderBS /> */}
|
||||
// <div className="row">
|
||||
// <div className="col-12">
|
||||
// <p className='text-success'>Loading...</p>
|
||||
// </div>
|
||||
// </div>
|
||||
// </>
|
||||
// )
|
||||
// }
|
||||
|
||||
if(isError){
|
||||
return (
|
||||
<div className="row">
|
||||
<div className="col-12">
|
||||
<p className='text-danger'>Error occured! Please refresh to continue</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// if(isError){
|
||||
// return (
|
||||
// <div className="row">
|
||||
// <div className="col-12">
|
||||
// <p className='text-danger'>Error occured! Please refresh to continue</p>
|
||||
// </div>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
|
||||
return <>
|
||||
{/* <div className="row">
|
||||
|
||||
Reference in New Issue
Block a user