Skip to content

Commit c47eda3

Browse files
committed
chore: center + single spinner
1 parent 80b54fc commit c47eda3

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

src/containers/daoExplorer/daoExplorer.tsx

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -314,29 +314,26 @@ export const DaoExplorer = () => {
314314
}}
315315
/>
316316
) : (
317-
<CardsWrapper>
318-
{filters.quickFilter === 'featuredDaos' ? (
319-
<>
320-
{featuredDaoList?.map(
321-
(dao: IDao, index: React.Key | null | undefined) => (
322-
<DaoCard key={index} dao={dao} />
323-
)
324-
)}
325-
{isLoadingFeaturedDaos && (
326-
<Spinner size="xl" variant="primary" />
327-
)}
328-
</>
329-
) : (
330-
<>
331-
{filteredDaoList?.map(
332-
(dao: IDao, index: React.Key | null | undefined) => (
333-
<DaoCard key={index} dao={dao} />
334-
)
335-
)}
336-
{isLoading && <Spinner size="xl" variant="primary" />}
337-
</>
317+
<>
318+
{(isLoading || isLoadingFeaturedDaos) && (
319+
<div className="flex h-72 w-full items-center justify-center">
320+
<Spinner size="xl" variant="primary" />
321+
</div>
338322
)}
339-
</CardsWrapper>
323+
<CardsWrapper>
324+
{filters.quickFilter === 'featuredDaos'
325+
? featuredDaoList?.map(
326+
(dao: IDao, index: React.Key | null | undefined) => (
327+
<DaoCard key={index} dao={dao} />
328+
)
329+
)
330+
: filteredDaoList?.map(
331+
(dao: IDao, index: React.Key | null | undefined) => (
332+
<DaoCard key={index} dao={dao} />
333+
)
334+
)}
335+
</CardsWrapper>
336+
</>
340337
)}
341338
</MainContainer>
342339
{totalDaos != null &&

0 commit comments

Comments
 (0)