-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/frontend/src/features/users/components/UserDetailBioInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { useRef } from "react"; | ||
import { ModalContent, ModalBody, ModalHeader, ModalFooter, Button, Textarea } from "@nextui-org/react"; | ||
|
||
const UserDetailBioInput = ({ bio }: { bio: string }) => { | ||
const input_ref = useRef<HTMLInputElement>(null); | ||
|
||
const handle_submit = (e: React.FormEvent<HTMLFormElement>) => { | ||
e.preventDefault(); | ||
console.log(input_ref.current?.value); | ||
}; | ||
|
||
return ( | ||
<ModalContent> | ||
<form onSubmit={handle_submit}> | ||
<ModalHeader>自己紹介文を編集</ModalHeader> | ||
<ModalBody> | ||
<Textarea defaultValue={bio} ref={input_ref} /> | ||
</ModalBody> | ||
<ModalFooter> | ||
<Button color="primary" type="submit"> | ||
保存 | ||
</Button> | ||
</ModalFooter> | ||
</form> | ||
</ModalContent> | ||
); | ||
}; | ||
|
||
export { UserDetailBioInput }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters