From 7539d14bbac888af3998cc94d4c7948b2934382f Mon Sep 17 00:00:00 2001 From: Jigar Patel Date: Sat, 7 Dec 2024 02:29:22 +0530 Subject: [PATCH] fix(provider): dashboard ui issue fixed --- .../src/components/dashboard/FinanceCard.tsx | 2 +- .../src/components/home/HomeContainer.tsx | 6 ++---- .../src/components/home/WelcomePanel.tsx | 4 +++- apps/provider-console/src/pages/dashboard/index.tsx | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/provider-console/src/components/dashboard/FinanceCard.tsx b/apps/provider-console/src/components/dashboard/FinanceCard.tsx index 3c24171f4..43996b616 100644 --- a/apps/provider-console/src/components/dashboard/FinanceCard.tsx +++ b/apps/provider-console/src/components/dashboard/FinanceCard.tsx @@ -43,7 +43,7 @@ const PercentChange: React.FC = ({ currentPrice, previousPri export const FinanceCard: React.FC = ({ title, subtitle, currentPrice, previousPrice, message }) => { return ( - +
{subtitle}
diff --git a/apps/provider-console/src/components/home/HomeContainer.tsx b/apps/provider-console/src/components/home/HomeContainer.tsx index 18131901d..3ad93a023 100644 --- a/apps/provider-console/src/components/home/HomeContainer.tsx +++ b/apps/provider-console/src/components/home/HomeContainer.tsx @@ -3,21 +3,19 @@ import React, { useEffect, useState } from "react"; import { useRouter } from "next/router"; import { useWallet } from "@src/context/WalletProvider"; -import { useProviderActions } from "@src/queries/useProviderQuery"; import { Layout } from "../layout/Layout"; import { WelcomePanel } from "./WelcomePanel"; export const HomeContainer: React.FC = () => { const router = useRouter(); - const { isWalletConnected, isProvider, isOnline, isProviderStatusFetched } = useWallet(); + const { isWalletConnected, isProvider, isProviderStatusFetched } = useWallet(); const [isLoading] = useState(false); - const { data: providerActions } = useProviderActions(); useEffect(() => { if (isWalletConnected && isProviderStatusFetched && isProvider) { router.push("/dashboard"); } - }, [isWalletConnected, isProvider, isOnline, providerActions, router]); + }, [isWalletConnected, isProvider, router, isProviderStatusFetched]); return ( diff --git a/apps/provider-console/src/components/home/WelcomePanel.tsx b/apps/provider-console/src/components/home/WelcomePanel.tsx index 1355f1de8..9b59bded9 100644 --- a/apps/provider-console/src/components/home/WelcomePanel.tsx +++ b/apps/provider-console/src/components/home/WelcomePanel.tsx @@ -57,7 +57,9 @@ export const WelcomePanel: React.FC = () => {
- Know more about Providers on Akash. + + Know more about Providers on Akash. + Find out all about Akash Providers.
diff --git a/apps/provider-console/src/pages/dashboard/index.tsx b/apps/provider-console/src/pages/dashboard/index.tsx index b83058126..52473297b 100644 --- a/apps/provider-console/src/pages/dashboard/index.tsx +++ b/apps/provider-console/src/pages/dashboard/index.tsx @@ -41,7 +41,7 @@ const Dashboard: React.FC = () => { const summaryCards = useMemo( () => ( - <> +
{ previousPrice={providerDashboard?.previous.totalLeaseCount} message="Change in total leases compared to 24 hours ago" /> - +
), [providerDashboard] ); @@ -90,14 +90,14 @@ const Dashboard: React.FC = () => { {isLoadingProviderDashboard && }
-
+
{isLoadingProviderDashboard ? ( - <> +
- +
) : ( summaryCards )}