From feb856b03b68730e628b40e39d85137e35768b06 Mon Sep 17 00:00:00 2001 From: Usame Algan Date: Wed, 7 Feb 2024 13:40:04 +0100 Subject: [PATCH] fix: Display the widget in the dashboard --- src/components/dashboard/FirstSteps/index.tsx | 2 +- src/components/dashboard/index.tsx | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/dashboard/FirstSteps/index.tsx b/src/components/dashboard/FirstSteps/index.tsx index ec1473b7be..c1065dcec9 100644 --- a/src/components/dashboard/FirstSteps/index.tsx +++ b/src/components/dashboard/FirstSteps/index.tsx @@ -26,7 +26,7 @@ type StatusProgressItems = Array<{ const StatusProgress = ({ items }: { items: StatusProgressItems }) => { const totalNumberOfItems = items.length const completedItems = items.filter((item) => item.completed) - const progress = Math.ceil(completedItems.length / totalNumberOfItems) * 100 + const progress = Math.round((completedItems.length / totalNumberOfItems) * 100) return ( <> diff --git a/src/components/dashboard/index.tsx b/src/components/dashboard/index.tsx index 75d8d96613..6ae0f9f838 100644 --- a/src/components/dashboard/index.tsx +++ b/src/components/dashboard/index.tsx @@ -1,3 +1,4 @@ +import FirstSteps from '@/components/dashboard/FirstSteps' import type { ReactElement } from 'react' import dynamic from 'next/dynamic' import { Grid } from '@mui/material' @@ -32,6 +33,14 @@ const Dashboard = (): ReactElement => { + + + + + + + +