-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { Suspense } from 'react'; | ||
import { Box, Flex, Divider, Spinner } from '@chakra-ui/react'; | ||
|
||
import { BooksSectionType } from './types'; | ||
|
||
export function BooksSection({ | ||
title, | ||
data, | ||
booksComponent, | ||
}: BooksSectionType) { | ||
return ( | ||
<> | ||
<Box my='10'> | ||
<Divider borderColor='gray.400' /> | ||
</Box> | ||
<Flex direction='column'> | ||
<Box | ||
p='2' | ||
mb='3' | ||
fontSize={{ base: 'xl', md: '2xl' }} | ||
textAlign={{ base: 'center', lg: 'left' }} | ||
ml={{ base: 0, lg: 2 }} | ||
> | ||
{title}{' '} | ||
<Box as='span' fontWeight='semibold'> | ||
{data} | ||
</Box> | ||
</Box> | ||
<Suspense | ||
fallback={ | ||
<Box p='3'> | ||
<Spinner size='lg' /> | ||
</Box> | ||
} | ||
> | ||
<Box>{booksComponent}</Box> | ||
</Suspense> | ||
</Flex> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daf0f2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
xbu – ./
xbu-franqsanz.vercel.app
xbu.vercel.app
xbu-git-main-franqsanz.vercel.app