1
0
Fork 0
mirror of https://github.com/voltbonn/profile-picture-generator.git synced 2024-12-22 07:45:04 +00:00

changed onFrameChange to onChange

This commit is contained in:
thomasrosen 2021-01-23 18:44:39 +01:00
parent 266c86b958
commit e2f3259d41
2 changed files with 4 additions and 4 deletions

View file

@ -286,7 +286,7 @@ function App() {
</label>
{!!originalPhoto ? (<>
<FrameChooser onFrameChange={handleFrameURL} />
<FrameChooser onChange={handleFrameURL} />
</>) : null}
{!!originalPhoto && !!frameURL ? (<>

View file

@ -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">