Skip to content

Commit a4cf20c

Browse files
committed
refactor: input value 덮어씌워지지 않도록 수정
1 parent 68797b7 commit a4cf20c

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

client/src/pages/Workspace/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from 'react';
1+
import { useEffect, useState } from 'react';
22
import SelcetModal from 'src/components/SelectModal';
33
import WorkspaceList from 'src/components/WorkspaceList';
44
import WorkspaceModal from 'src/components/WorkspaceModal';
@@ -29,6 +29,10 @@ function WorkspacePage() {
2929
}
3030
};
3131

32+
useEffect(() => {
33+
if (clickedMenuId !== 3) setInputValue('');
34+
}, [clickedMenuId]);
35+
3236
return (
3337
<div className={style.container}>
3438
<WorkspaceList onSelectModalOpen={() => setIsOpenSelectModal(true)} />

package-lock.json

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)