Skip to content

Commit

Permalink
feat: #63 prepared library and component
Browse files Browse the repository at this point in the history
  • Loading branch information
pablitoo1 committed Apr 28, 2024
1 parent 0d27ec3 commit 0215774
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
24 changes: 24 additions & 0 deletions 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 @@ -15,6 +15,7 @@
"next": "^14.1.3",
"react": "^18",
"react-dom": "^18",
"react-easy-crop": "^5.0.6",
"react-icons": "^5.0.1",
"react-leaflet": "^4.2.1",
"react-multi-carousel": "^2.8.5",
Expand Down
18 changes: 18 additions & 0 deletions src/components/common/ImageCrop/ImageCropFrame.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use client";
import { useState } from "react";
import { CropperProps, Area } from "react-easy-crop";
import Cropper from 'react-easy-crop';

export function ImageCropFrame() {

const [crop, setCrop] = useState<CropperProps['crop']>({ x: 0, y: 0 });
const [zoom, setZoom] = useState<number>(1);
const [image, setImage] = useState<string | ArrayBuffer | null>(null);
const [croppedAreaPixels, setCroppedAreaPixels] = useState<Area>();
const [fileCropped, setFileCropped] = useState<File>(new File([], ""));

return (
<>
</>
);
}

0 comments on commit 0215774

Please sign in to comment.