1
0
Fork 0
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:
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> </label>
{!!originalPhoto ? (<> {!!originalPhoto ? (<>
<FrameChooser onFrameChange={handleFrameURL} /> <FrameChooser onChange={handleFrameURL} />
</>) : null} </>) : null}
{!!originalPhoto && !!frameURL ? (<> {!!originalPhoto && !!frameURL ? (<>

View file

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