From c4db68f03c2091192e2b78e0085e75dfea0bb3b9 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Mon, 6 May 2024 13:09:59 +0530 Subject: [PATCH] feat(usecase): add loader till response generate (#753) --- .../UsecaseParticipation.scss | 5 + .../pages/UsecaseParticipation/index.tsx | 224 ++++++++++-------- 2 files changed, 127 insertions(+), 102 deletions(-) diff --git a/src/components/pages/UsecaseParticipation/UsecaseParticipation.scss b/src/components/pages/UsecaseParticipation/UsecaseParticipation.scss index 16d5e9232..cff65522a 100644 --- a/src/components/pages/UsecaseParticipation/UsecaseParticipation.scss +++ b/src/components/pages/UsecaseParticipation/UsecaseParticipation.scss @@ -71,6 +71,11 @@ max-width: 850px; width: 100%; margin: 0 auto 50px; + .progress-main { + height: 100px; + text-align: center; + padding: 30px; + } ul { list-style: none; .seperation { diff --git a/src/components/pages/UsecaseParticipation/index.tsx b/src/components/pages/UsecaseParticipation/index.tsx index 67157a622..dde0116d9 100644 --- a/src/components/pages/UsecaseParticipation/index.tsx +++ b/src/components/pages/UsecaseParticipation/index.tsx @@ -17,8 +17,11 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import { useEffect } from 'react' +import { Link } from 'react-router-dom' import { useDispatch } from 'react-redux' import { useTranslation, Trans } from 'react-i18next' +import { CircularProgress, useTheme } from '@mui/material' import { Chip, PageHeader, @@ -38,14 +41,13 @@ import { } from 'features/usecase/usecaseApiSlice' import './UsecaseParticipation.scss' import { SubscriptionStatus } from 'features/apps/types' -import { useEffect } from 'react' -import { Link } from 'react-router-dom' export default function UsecaseParticipation() { const { t } = useTranslation() + const theme = useTheme() const dispatch = useDispatch() - const { data, refetch } = useFetchUsecaseQuery() + const { data, refetch, isLoading } = useFetchUsecaseQuery() useEffect(() => { refetch() @@ -136,116 +138,134 @@ export default function UsecaseParticipation() {
- ) - })} + + + ) + })} + +
+ + ) + }) + )}