Skip to content

Commit

Permalink
Update web deps
Browse files Browse the repository at this point in the history
  • Loading branch information
paescuj committed Jul 30, 2023
1 parent a8a8299 commit 0fd8f7a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 63 deletions.
105 changes: 51 additions & 54 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions web/components/application/Card/Pdf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Box,
Center,
Collapse,
Flex,
useBreakpointValue,
useColorMode,
Expand All @@ -12,7 +11,13 @@ import ReactDOMServer from 'react-dom/server';
import { useIntl } from 'react-intl';
import Measure from 'react-measure';
import { Document, Page, pdfjs } from 'react-pdf';
import { A11y, Controller, Keyboard, Navigation, Pagination } from 'swiper';
import {
A11y,
Controller,
Keyboard,
Navigation,
Pagination,
} from 'swiper/modules';
import { Swiper, SwiperSlide } from 'swiper/react';

import Loader from '@/components/common/Loader';
Expand Down Expand Up @@ -198,7 +203,13 @@ export default function Pdf({
w="100%"
ref={measureRef}
>
<Collapse in={documentLoaded}>
<motion.div
animate={documentLoaded ? 'open' : 'collapsed'}
variants={{
open: { opacity: 1, height: 'auto' },
collapsed: { opacity: 0, height: 0 },
}}
>
<Document
file={transformedFile}
loading=""
Expand Down Expand Up @@ -312,7 +323,7 @@ export default function Pdf({
</Swiper>
</Box>
</Document>
</Collapse>
</motion.div>
</Box>
)}
</Measure>
Expand Down
Loading

0 comments on commit 0fd8f7a

Please sign in to comment.