From bcc27a37bfb4f4cf28e3a841805e7b3c2c6161c3 Mon Sep 17 00:00:00 2001 From: 34719022 <34719022@stn.nitech.ac.jp> Date: Tue, 19 Nov 2024 21:18:39 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=892?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/Components/PostForm/PostForm.tsx | 15 +++++++++++++++ src/app/Components/PostForm/PostFormPage.tsx | 11 +++++++++++ src/app/Components/PostForm/Posts.module.scss | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 src/app/Components/PostForm/PostFormPage.tsx create mode 100644 src/app/Components/PostForm/Posts.module.scss diff --git a/src/app/Components/PostForm/PostForm.tsx b/src/app/Components/PostForm/PostForm.tsx index 494ad19..aea2663 100644 --- a/src/app/Components/PostForm/PostForm.tsx +++ b/src/app/Components/PostForm/PostForm.tsx @@ -14,10 +14,14 @@ export default function PostForm() { const handleImageChange = (event: ChangeEvent) => { // TODO: 画像の更新 + const selectedFile = event.target.files?.[0]; + setImage(selectedFile || null); + setError(""); }; const handleTextChange = (event: ChangeEvent) => { // TODO: テキストの更新 + setText(event.target.value); }; const handleUpload = () => { @@ -79,10 +83,21 @@ export default function PostForm() { {error && {error}} {/* TODO: テキスト入力 */} + {/* TODO: 画像選択 */} + {/* TODO: アップロードボタン */} + {progress !== 100 && } diff --git a/src/app/Components/PostForm/PostFormPage.tsx b/src/app/Components/PostForm/PostFormPage.tsx new file mode 100644 index 0000000..312b169 --- /dev/null +++ b/src/app/Components/PostForm/PostFormPage.tsx @@ -0,0 +1,11 @@ +import UserForm from './PostForm'; +import styles from './Posts.module.scss'; + +export default function UserFormPage() { + return ( +
+

ユーザー登録

+ +
+ ); +} diff --git a/src/app/Components/PostForm/Posts.module.scss b/src/app/Components/PostForm/Posts.module.scss new file mode 100644 index 0000000..5fbae6f --- /dev/null +++ b/src/app/Components/PostForm/Posts.module.scss @@ -0,0 +1,3 @@ +.post { + display: flex; +}