added new loader
This commit is contained in:
parent
49cf94546a
commit
006a68f2fe
@ -4,6 +4,7 @@ import TenantDetails from "./TenantDetails";
|
|||||||
import { hasUserPermission } from "../../utils/authUtils";
|
import { hasUserPermission } from "../../utils/authUtils";
|
||||||
import { VIEW_TENANTS } from "../../utils/constants";
|
import { VIEW_TENANTS } from "../../utils/constants";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import Loader from "../../components/common/Loader";
|
||||||
|
|
||||||
const SelfTenantDetails = () => {
|
const SelfTenantDetails = () => {
|
||||||
const { profile, loading } = useProfile();
|
const { profile, loading } = useProfile();
|
||||||
@ -18,7 +19,7 @@ const SelfTenantDetails = () => {
|
|||||||
}, [isSelfTenantView, navigate]);
|
}, [isSelfTenantView, navigate]);
|
||||||
|
|
||||||
if (loading || !tenantId) {
|
if (loading || !tenantId) {
|
||||||
return <div>Loading...</div>;
|
return <Loader/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { ComingSoonPage } from "../Misc/ComingSoonPage";
|
|||||||
import GlobalModel from "../../components/common/GlobalModel";
|
import GlobalModel from "../../components/common/GlobalModel";
|
||||||
import EditProfile from "../../components/Tenant/EditProfile";
|
import EditProfile from "../../components/Tenant/EditProfile";
|
||||||
import SubScriptionHistory from "../../components/Tenant/SubScriptionHistory";
|
import SubScriptionHistory from "../../components/Tenant/SubScriptionHistory";
|
||||||
|
import Loader from "../../components/common/Loader";
|
||||||
|
|
||||||
const TenantDetailsContext = createContext();
|
const TenantDetailsContext = createContext();
|
||||||
export const useTenantDetailsContext = () => useContext(TenantDetailsContext);
|
export const useTenantDetailsContext = () => useContext(TenantDetailsContext);
|
||||||
@ -61,7 +62,7 @@ const TenantDetails = ({
|
|||||||
[data, activeTenantId]
|
[data, activeTenantId]
|
||||||
);
|
);
|
||||||
if (!activeTenantId) return <div className="my-4">No tenant selected.</div>;
|
if (!activeTenantId) return <div className="my-4">No tenant selected.</div>;
|
||||||
if (isLoading) return <div className="my-4">Loading...</div>;
|
if (isLoading) return <div className="my-4"><Loader/></div>;
|
||||||
if (isError) return <div className="my-3">{error?.message}</div>;
|
if (isError) return <div className="my-3">{error?.message}</div>;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,6 @@ const TenantPage = () => {
|
|||||||
() => <TenantFilterPanel onApply={handleApplyFilters} />,
|
() => <TenantFilterPanel onApply={handleApplyFilters} />,
|
||||||
[handleApplyFilters]
|
[handleApplyFilters]
|
||||||
);
|
);
|
||||||
console.log(isSelfTenant)
|
|
||||||
// ---------- Fab Filter Panel ----------
|
// ---------- Fab Filter Panel ----------
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isSuperTenant) return;
|
if (!isSuperTenant) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user