From 7743014d85ce49b5e8233c568fd7a13916ac36a5 Mon Sep 17 00:00:00 2001 From: Zhang Ziqing Date: Mon, 31 Oct 2022 00:41:53 +0800 Subject: [PATCH] [offers][style] arrange loading spinner in profile --- .../src/pages/offers/profile/[offerProfileId].tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx index 8c75f77e..fdab7bd9 100644 --- a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx +++ b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx @@ -1,6 +1,7 @@ import Error from 'next/error'; import { useRouter } from 'next/router'; import { useState } from 'react'; +import { Spinner, useToast } from '@tih/ui'; import { ProfileDetailTab } from '~/components/offers/constants'; import ProfileComments from '~/components/offers/profile/ProfileComments'; @@ -14,7 +15,6 @@ import { HOME_URL } from '~/components/offers/types'; import type { JobTitleType } from '~/components/shared/JobTitles'; import { getLabelForJobTitleType } from '~/components/shared/JobTitles'; -import { useToast } from '~/../../../packages/ui/dist'; import { convertMoneyToString } from '~/utils/offers/currency'; import { getProfilePath } from '~/utils/offers/link'; import { formatDate } from '~/utils/offers/time'; @@ -180,7 +180,15 @@ export default function OfferProfile() { )} - {!getProfileQuery.isError && ( + {getProfileQuery.isLoading && ( +
+
+ +
Loading...
+
+
+ )} + {!getProfileQuery.isLoading && !getProfileQuery.isError && (