Skip to content

Commit

Permalink
refactor: 로컬스토리지에 값이 있다면 name, department 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
2NNS-V committed Sep 11, 2024
1 parent abc2d77 commit cb069b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function HomePage() {
const userInfo = useUserInfo((state) => state);

const [isOpen, setIsOpen] = useState<boolean>(false);
const [selectedDepartment, setSelectedDepartment] = useState<string>("");
const [selectedDepartment, setSelectedDepartment] = useState<string>(userInfo.department);

const handleSideBar = () => {
setIsOpen(!isOpen);
Expand Down Expand Up @@ -98,6 +98,7 @@ export default function HomePage() {
height="45px"
placeholder="이름을 입력하세용"
onChange={(e) => userInfo.setName(e.currentTarget.value)}
defaultValue={userInfo.name}
/>
<DropDown
color="primary"
Expand Down

0 comments on commit cb069b8

Please sign in to comment.