doc: added methods to handleChange and handleSurpriseMe method

This commit is contained in:
Leon Xu committed 2023-01-30 15:10:26 -08:00
1 parent 852d5a8104
commit 67ace25022
1 file changed
+7 -2
+7 -2
View File
@@ -19,9 +19,14 @@ const CreatePost = () => {
const handleSubmit = () => {};
const handleChange = (e) => {};
const handleChange = (e) => {
setForm({ ...form, [e.target.name]: e.target.value });
};
const handleSurpriseMe = () => {};
const handleSurpriseMe = () => {
const randomPrompt = getRandomPrompt(form.prompt);
setForm({ ...form, prompt: randomPrompt });
};
const generateImage = () => {};