mirror of
https://github.com/voltbonn/profile-picture-generator.git
synced 2024-12-22 15:55:08 +00:00
changed onFrameChange to onChange
This commit is contained in:
parent
266c86b958
commit
e2f3259d41
2 changed files with 4 additions and 4 deletions
|
@ -286,7 +286,7 @@ function App() {
|
|||
</label>
|
||||
|
||||
{!!originalPhoto ? (<>
|
||||
<FrameChooser onFrameChange={handleFrameURL} />
|
||||
<FrameChooser onChange={handleFrameURL} />
|
||||
</>) : null}
|
||||
|
||||
{!!originalPhoto && !!frameURL ? (<>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect, useCallback } from 'react'
|
||||
|
||||
function FrameChooser({onFrameChange}) {
|
||||
function FrameChooser({onChange}) {
|
||||
const [frames, setFrames] = useState([])
|
||||
const [choosenFrame, setChoosenFrame] = useState(null)
|
||||
|
||||
|
@ -38,8 +38,8 @@ function FrameChooser({onFrameChange}) {
|
|||
}, [setChoosenFrame])
|
||||
|
||||
useEffect(() => {
|
||||
onFrameChange(choosenFrame)
|
||||
}, [onFrameChange, choosenFrame])
|
||||
onChange(choosenFrame)
|
||||
}, [onChange, choosenFrame])
|
||||
|
||||
return (
|
||||
<div className="FrameChooser">
|
||||
|
|
Loading…
Reference in a new issue