Skip to content

Commit

Permalink
feat: an effect was added to the images
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Jul 24, 2024
1 parent 6ef4bd0 commit 48f37b7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
15 changes: 14 additions & 1 deletion package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@emotion/styled": "11.13.0",
"@tanstack/react-query": "5.51.11",
"@tanstack/react-query-devtools": "5.51.11",
"atropos": "2.0.2",
"chakra-react-select": "4.9.1",
"firebase": "10.12.4",
"framer-motion": "11.3.8",
Expand Down
39 changes: 26 additions & 13 deletions src/pages/Book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import {
import { BsTag } from 'react-icons/bs';
import { FaCheckCircle } from 'react-icons/fa';
import LazyLoad from 'react-lazy-load';
import Atropos from 'atropos/react';
import 'atropos/css';

import { useBook, useDeleteBook } from '@hooks/queries';
import { handleImageLoad } from '@utils/utils';
Expand Down Expand Up @@ -453,19 +455,30 @@ export default function Book() {
zIndex='1'
>
<LazyLoad width={290} height={420} offset={0} threshold={0.99}>
<ImageZoom
w='290px'
h='420px'
src={data.image.url}
alt={`Imagen de "${data.title}"`}
rounded='lg'
border='1px solid #A0AEC0'
boxShadow='lg'
decoding='async'
filter='blur(10px)'
transition='filter 0.5s ease-in-out'
onLoad={handleImageLoad}
/>
<Atropos
highlight={true}
rotateTouch={false}
rotateXMax={30}
rotateYMax={30}
stretchX={45}
stretchY={45}
duration={200}
shadow={false}
>
<ImageZoom
w='290px'
h='420px'
src={data.image.url}
alt={`Imagen de "${data.title}"`}
rounded='lg'
border='1px solid #A0AEC0'
boxShadow='lg'
decoding='async'
filter='blur(10px)'
transition='filter 0.5s ease-in-out'
onLoad={handleImageLoad}
/>
</Atropos>
</LazyLoad>
</Flex>
<Image
Expand Down

0 comments on commit 48f37b7

Please sign in to comment.