From 94b96859455749fa364d811e1986be068a35a404 Mon Sep 17 00:00:00 2001 From: LHK <30331140+freerer2@users.noreply.github.com.> Date: Fri, 21 Feb 2025 17:31:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EB=94=B0=20=EB=8C=80=EA=B0=80?= =?UTF-8?q?=EB=A6=AC=20=EA=B9=A8=EC=A7=80=EB=84=A4=20=EC=98=88=EC=8B=9C=20?= =?UTF-8?q?=EB=A7=8C=EB=93=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/app/page.tsx | 58 +++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index d6b7862..ca1e4c0 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -1,33 +1,47 @@ "use client" -import Image from "next/image"; + import {Greet} from "@/wailsjs/go/main/App"; import { main } from "@/wailsjs/go/models"; -import {useState} from "react"; +import React, {useState} from "react"; export default function Home() { - const [result, setResult] = useState('Please enter your name below πŸ‘‡') - const person = new main.Person(); - person.age= 11; - person.name="dd"; + const [person, setPerson] = useState(new main.Person()); + const [result, setResult] = useState('Please enter your name below πŸ‘‡'); + + const handleInputChange = (e: React.ChangeEvent, field: string) => { + setPerson(prevPerson => ({ + ...prevPerson, + [field]: field === 'age' ? parseInt(e.target.value) : e.target.value, + convertValues: prevPerson.convertValues // κΈ°μ‘΄ convertValues 속성 μœ μ§€ + })); + }; return <> - {result} - }