mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-19 14:04:06 +01:00
fix: use legacyLoader
This commit is contained in:
parent
9c61be2ad3
commit
77b75e1727
@ -8,7 +8,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { createSupabaseClient } from "@/lib/supabase/clientComponentClient";
|
import { createSupabaseClient } from "@/lib/supabase/clientComponentClient";
|
||||||
import useSession from "@/lib/supabase/useSession";
|
import useSession from "@/lib/supabase/useSession";
|
||||||
import { getProjectByUserId } from "@/lib/data/projectQuery";
|
import { getProjectByUserId } from "@/lib/data/projectQuery";
|
||||||
import { Loader } from "@/components/loading/loader";
|
// import { Loader } from "@/components/loading/loader";
|
||||||
import { getInvestmentByProjectsIds } from "@/lib/data/investmentQuery";
|
import { getInvestmentByProjectsIds } from "@/lib/data/investmentQuery";
|
||||||
import { useQuery } from "@supabase-cache-helpers/postgrest-react-query";
|
import { useQuery } from "@supabase-cache-helpers/postgrest-react-query";
|
||||||
import { overAllGraphData, fourYearGraphData, dayOftheWeekData } from "../portfolio/[uid]/query";
|
import { overAllGraphData, fourYearGraphData, dayOftheWeekData } from "../portfolio/[uid]/query";
|
||||||
@ -16,6 +16,7 @@ import CountUp from "react-countup";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Modal } from "@/components/modal";
|
import { Modal } from "@/components/modal";
|
||||||
|
import { LegacyLoader } from "@/components/loading/LegacyLoader";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
const supabase = createSupabaseClient();
|
const supabase = createSupabaseClient();
|
||||||
@ -119,9 +120,13 @@ export default function Dashboard() {
|
|||||||
setTopLatestInvestment();
|
setTopLatestInvestment();
|
||||||
}, [currentProjectId, investmentDetail?.data]);
|
}, [currentProjectId, investmentDetail?.data]);
|
||||||
|
|
||||||
|
if (isLoadingSession && isLoadingProjects) {
|
||||||
|
return <LegacyLoader />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container max-w-screen-xl">
|
<div className="container max-w-screen-xl">
|
||||||
<Loader isSuccess={!isLoadingSession && !isLoadingProjects} />{" "}
|
{/* <Loader isSuccess={!isLoadingSession && !isLoadingProjects} />{" "} */}
|
||||||
<div className="flex-1 space-y-4 p-8 pt-6">
|
<div className="flex-1 space-y-4 p-8 pt-6">
|
||||||
<div className="flex items-center justify-between space-y-2">
|
<div className="flex items-center justify-between space-y-2">
|
||||||
<h2 className="text-3xl font-bold tracking-tight">Business Dashboard</h2>
|
<h2 className="text-3xl font-bold tracking-tight">Business Dashboard</h2>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user