File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ npm i --save react-avatar-editor
29
29
pnpm add react-avatar-editor
30
30
```
31
31
32
- ## [ Demo] ( https://react-avatar-editor.netlify.com / )
32
+ ## [ Demo] ( https://react-avatar-editor.netlify.app / )
33
33
34
34
![ ] ( https://thumbs.gfycat.com/FlawedBlushingGermanwirehairedpointer-size_restricted.gif )
35
35
@@ -90,7 +90,7 @@ The resulting image will have the same resolution as the original image, for tha
90
90
If you want the image sized in the dimensions of the canvas you can use ` getImageScaledToCanvas ` .
91
91
92
92
``` javascript
93
- import React from ' react'
93
+ import React , { useRef } from ' react'
94
94
import AvatarEditor from ' react-avatar-editor'
95
95
96
96
const MyEditor = () => {
@@ -169,7 +169,7 @@ _Note that:_ `getImage()` returns a canvas element and if you want to use it in
169
169
170
170
``` js
171
171
const getImageUrl = async () => {
172
- const dataUrl = editor .getImage ().toDataURL ()
172
+ const dataUrl = editor .current . getImage ().toDataURL ()
173
173
const res = await fetch (dataUrl)
174
174
const blob = await res .blob ()
175
175
You can’t perform that action at this time.
0 commit comments