Skip to content

Commit

Permalink
fixed refresh token, added disabled menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-arc10 committed Oct 16, 2024
1 parent 44934ae commit d91d340
Show file tree
Hide file tree
Showing 13 changed files with 269 additions and 109 deletions.
1 change: 1 addition & 0 deletions apps/provider-console/sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: "https://[email protected]/2",
enabled: "false",
integrations: [Sentry.replayIntegration()],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import { Card, CardContent } from "@akashnetwork/ui/components";

const DashboardCardSkeleton: React.FC = () => (
<Card>
<CardContent className="rounded-lg p-6 shadow-md">
<div className="grid grid-cols-2 gap-4">
<div>
<div className="h-4 w-24 animate-pulse bg-gray-200 rounded"></div>
<div className="mt-2 h-8 w-32 animate-pulse bg-gray-200 rounded"></div>
<div className="mt-1 h-4 w-16 animate-pulse bg-gray-200 rounded"></div>
</div>
<div className="col-span-2 flex items-center justify-end">
<div className="h-24 w-full animate-pulse bg-gray-200 rounded"></div>
</div>
</div>
</CardContent>
</Card>
);

export default DashboardCardSkeleton;
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ export const StatPieChart: React.FC<StatPieChartProps> = ({ activeResources, pen
<ChartContainer config={chartConfig} className="min-h-[100px] w-full">
<ResponsiveContainer width="100%" height={150}>
<PieChart>
<Pie data={data} cx="50%" cy="50%" labelLine={false} label={renderCustomizedLabel} outerRadius={45} fill="#8884d8" dataKey="value" paddingAngle={2}>
<Pie
data={data}
cx="50%"
cy="50%"
// labelLine={true}
// label={renderCustomizedLabel}
innerRadius={30}
outerRadius={40}
fill="#8884d8"
dataKey="value"
paddingAngle={5}
>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={COLORS[index % COLORS.length]} />
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function HomeContainer() {
<Layout containerClassName="flex h-full flex-col justify-between" isLoading={!isProviderStatusFetched || isLoading}>
<div className="flex flex-grow items-center justify-center">
<div className="mb-4">
{(!isProviderStatusFetched || isLoading) ? (
{(!isProviderStatusFetched || isLoading) && isWalletConnected ? (
<div className="flex flex-col items-center justify-center">
<Spinner />
<p className="mt-2">{loadingMessage}</p>
Expand Down
38 changes: 36 additions & 2 deletions apps/provider-console/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, buttonVariants } from "@akashnetwork/ui/components";
import Drawer from "@mui/material/Drawer";
import { useTheme as useMuiTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import { Discord, Github, Menu, MenuScale, Rocket, X as TwitterX, Youtube } from "iconoir-react";
import { Discord, Github, Menu, MenuScale, Rocket, X as TwitterX, Youtube, Cloud, Settings, ClipboardCheck, Calculator, ListSelect } from "iconoir-react";
import { Home, OpenInWindow } from "iconoir-react";
import getConfig from "next/config";
import Image from "next/image";
Expand Down Expand Up @@ -43,6 +43,41 @@ export const Sidebar: React.FunctionComponent<Props> = ({ isMobileOpen, handleDr
icon: props => <Home {...props} />,
url: UrlService.home(),
activeRoutes: [UrlService.home()]
},
{
title: "Leases",
icon: props => <Cloud {...props} />,
url: "#",
activeRoutes: ["#"],
disabled: true
},
{
title: "Actions",
icon: props => <ClipboardCheck {...props} />,
url: "#",
activeRoutes: ["#"],
disabled: true
},
{
title: "Pricing",
icon: props => <Calculator {...props} />,
url: "#",
activeRoutes: ["#"],
disabled: true
},
{
title: "Attributes",
icon: props => <ListSelect {...props} />,
url: "#",
activeRoutes: ["#"],
disabled: true
},
{
title: "Settings",
icon: props => <Settings {...props} />,
url: "#",
activeRoutes: ["#"],
disabled: true
}
]
},
Expand Down Expand Up @@ -238,4 +273,3 @@ export const Sidebar: React.FunctionComponent<Props> = ({ isMobileOpen, handleDr
</nav>
);
};

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const SidebarRouteButton: React.FunctionComponent<Props> = ({ route, clas
{
["font-bold"]: isSelected,
["min-w-[initial] px-4 py-1"]: isNavOpen,
["w-[45px] min-w-0 p-2"]: !isNavOpen
["w-[45px] min-w-0 p-2"]: !isNavOpen,
["pointer-events-none opacity-50"]: route.disabled // Add this line
}
)}
>
Expand Down
Loading

0 comments on commit d91d340

Please sign in to comment.