From fb8a5f54695ca78376f3397f347c04d987d93405 Mon Sep 17 00:00:00 2001 From: Takasuka_Takumi Date: Wed, 5 Jul 2023 10:26:05 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AC=E3=82=B3=E3=83=BC=E3=83=89=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E6=99=82=E3=81=ABteacher=E3=81=8C=E6=9C=A8=E5=AE=9F?= =?UTF-8?q?=E5=A4=AA=E9=83=8E=E3=81=AB=E3=81=AA=E3=82=8B=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/RecordAddModal/RecordAddModal.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/view/next-project/src/components/common/RecordAddModal/RecordAddModal.tsx b/view/next-project/src/components/common/RecordAddModal/RecordAddModal.tsx index 9810c32..7f95dba 100644 --- a/view/next-project/src/components/common/RecordAddModal/RecordAddModal.tsx +++ b/view/next-project/src/components/common/RecordAddModal/RecordAddModal.tsx @@ -53,8 +53,7 @@ interface CurriculumChapters { } interface Teacher { - user_id: number | string; - record_id: string; + user_id: string; } interface User { @@ -72,7 +71,7 @@ const RecordAddModal: FC = (props) => { const [curriculumChapter, setCurriculumChapter] = useState(); const [records, setRecords] = useState([]); const [users, setUsers] = useState([{ id: '', name: '' }]); - const [teacherData, setTeacherData] = useState({ user_id: 1, record_id: '' }); + const [teacherData, setTeacherData] = useState({ user_id: '1' }); const [isAnimationOpen, setIsAnimationOpen] = useState(false); const [newRecordId, setNewRecordId] = useState(''); @@ -128,8 +127,8 @@ const RecordAddModal: FC = (props) => { ) => { setRecordData({ ...recordData, [input]: e.target.value }); }; - - const handleTeacher = () => (e: React.ChangeEvent) => { + + const handleTeacher = (e: React.ChangeEvent) => { setTeacherData({ ...teacherData, user_id: e.target.value }); };