Skip to content

Commit

Permalink
Fix React example 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
willnguyen1312 committed Nov 14, 2023
1 parent 89ab28c commit 471c8b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/with-react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ function App() {
const { createZoomImage: createZoomImageMove } = useZoomImageMove()
const { createZoomImage: createZoomImageClick } = useZoomImageClick()

function handleCropImage() {
async function handleCropImage() {
setCroppedImage(
cropImage({
await cropImage({
currentZoom: zoomImageWheelState.currentZoom,
image: imageWheelContainerRef.current?.querySelector("img") as HTMLImageElement,
positionX: zoomImageWheelState.currentPositionX,
Expand Down Expand Up @@ -152,7 +152,7 @@ function App() {
{zoomType === "hover" && (
<>
<p>Hover inside the image to see zoom effect</p>
<div ref={imageHoverContainerRef} className="relative flex h-[250px] w-[250px] items-start">
<div ref={imageHoverContainerRef} className="relative flex h-[250px] w-[166.66px] items-start">
<img className="h-full w-full" alt="Small Pic" src="/sample.avif" />
<div ref={zoomTargetRef} className="absolute left-[300px]"></div>
</div>
Expand Down

0 comments on commit 471c8b3

Please sign in to comment.