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>
|
</label>
|
||||||
|
|
||||||
{!!originalPhoto ? (<>
|
{!!originalPhoto ? (<>
|
||||||
<FrameChooser onFrameChange={handleFrameURL} />
|
<FrameChooser onChange={handleFrameURL} />
|
||||||
</>) : null}
|
</>) : null}
|
||||||
|
|
||||||
{!!originalPhoto && !!frameURL ? (<>
|
{!!originalPhoto && !!frameURL ? (<>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useEffect, useCallback } from 'react'
|
import { useState, useEffect, useCallback } from 'react'
|
||||||
|
|
||||||
function FrameChooser({onFrameChange}) {
|
function FrameChooser({onChange}) {
|
||||||
const [frames, setFrames] = useState([])
|
const [frames, setFrames] = useState([])
|
||||||
const [choosenFrame, setChoosenFrame] = useState(null)
|
const [choosenFrame, setChoosenFrame] = useState(null)
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ function FrameChooser({onFrameChange}) {
|
||||||
}, [setChoosenFrame])
|
}, [setChoosenFrame])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onFrameChange(choosenFrame)
|
onChange(choosenFrame)
|
||||||
}, [onFrameChange, choosenFrame])
|
}, [onChange, choosenFrame])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="FrameChooser">
|
<div className="FrameChooser">
|
||||||
|
|
Loading…
Reference in a new issue