Skip to content

Commit

Permalink
Modify default value of name
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Dec 15, 2024
1 parent a853303 commit 944b998
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/blog/src/components/CommentForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface CommentFormProps {
const cx = classNames(styles, "comment-form");

function CommentForm({ slug, submit, isClientSide = false }: CommentFormProps) {
const [name, setName] = useState("익명");
const [name, setName] = useState(generateRandomName());
const [body, setBody] = useState("");
const formRef = useRef<HTMLFormElement>(null);

Expand Down Expand Up @@ -88,6 +88,9 @@ function CommentForm({ slug, submit, isClientSide = false }: CommentFormProps) {
onChange={({ currentTarget: { value } }) => {
setName(value);
}}
onFirstFocus={() => {
setName("");
}}
>
<Button
size="small"
Expand Down

1 comment on commit 944b998

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual regression test result - success

Component Story Success Viewport MisMatch Percentage
components-button string-children phone 0.00%
components-button string-children tablet 0.09%
input-input default phone 0.00%
input-input default tablet 0.00%
input-input line phone 0.00%
input-input line tablet 0.00%
input-input box phone 0.00%
input-input box tablet 0.00%
input-textarea line phone 0.00%
input-textarea line tablet 0.00%
input-textarea box phone 0.00%
input-textarea box tablet 0.00%
typography-typography default phone 0.00%
typography-typography default tablet 0.00%

Please sign in to comment.