Skip to content

Commit c36058d

Browse files
committed
refactor: isWriting 네이밍 수정
Resolve: #147
1 parent 20c0428 commit c36058d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

client/src/components/VoteBlock/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ const initialOption: Option[] = [
2121

2222
function VoteBlock() {
2323
const [options, setOptions] = useState<Option[]>(initialOption);
24-
const [isWriting, setIsWriting] = useState<boolean>(true);
24+
const [isUnRegisterd, setIsUnRegisterd] = useState<boolean>(true);
2525
const inputRef = useRef<HTMLInputElement>(null);
2626

2727
const onRegister = () => {
28-
if (!isWriting) return;
28+
if (!isUnRegisterd) return;
2929

30-
setIsWriting(false);
30+
setIsUnRegisterd(false);
3131
};
3232

3333
const onAdd = () => {
@@ -60,7 +60,7 @@ function VoteBlock() {
6060
<li className={style['option-item']} key={id} id={id.toString()}>
6161
<div className={style['box-fill']}>{index + 1}</div>
6262
<p className={style.option}>{option}</p>
63-
{isWriting && (
63+
{isUnRegisterd && (
6464
<div
6565
className={cx('box-fill', { 'position-right': true })}
6666
onClick={() => onDelete(id)}
@@ -71,7 +71,7 @@ function VoteBlock() {
7171
</li>
7272
))}
7373
</ul>
74-
{isWriting && (
74+
{isUnRegisterd && (
7575
<>
7676
<div className={style['option-item']}>
7777
<div className={style['box-fill']}></div>

0 commit comments

Comments
 (0)