-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from Selody-project/144-front-task-알림탭-위치-변경
issue #144 design: move notification button to Header
- Loading branch information
Showing
9 changed files
with
127 additions
and
133 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
47 changes: 20 additions & 27 deletions
47
src/components/Header/ProfileDropdown/ProfileDropdown.jsx
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 |
---|---|---|
@@ -1,41 +1,34 @@ | ||
import React, { forwardRef } from "react"; | ||
import React from "react"; | ||
import { useDispatch } from "react-redux"; | ||
import { Link, useNavigate } from "react-router-dom"; | ||
|
||
import DropdownBubble from "@/assets/icon/ic-profile-dropdown.svg"; | ||
import { logout } from "@/features/auth/auth-service"; | ||
|
||
import { | ||
ContainerDiv, | ||
ItemButton, | ||
MenuUl, | ||
MenuWrapDiv, | ||
} from "./ProfileDropdown.style"; | ||
import { ItemButton, MenuUl, MenuWrapDiv } from "./ProfileDropdown.style"; | ||
|
||
const ProfileDropdown = forwardRef((_, dropdownRef) => { | ||
const ProfileDropdown = () => { | ||
const dispatch = useDispatch(); | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<ContainerDiv> | ||
<MenuWrapDiv ref={dropdownRef}> | ||
<DropdownBubble /> | ||
<MenuUl> | ||
<li> | ||
<Link to="/setting"> | ||
<ItemButton>설정</ItemButton> | ||
</Link> | ||
</li> | ||
<hr /> | ||
<li> | ||
<ItemButton onClick={() => dispatch(logout(navigate))}> | ||
로그아웃 | ||
</ItemButton> | ||
</li> | ||
</MenuUl> | ||
</MenuWrapDiv> | ||
</ContainerDiv> | ||
<MenuWrapDiv> | ||
<DropdownBubble /> | ||
<MenuUl> | ||
<li> | ||
<Link to="/setting"> | ||
<ItemButton>설정</ItemButton> | ||
</Link> | ||
</li> | ||
<hr /> | ||
<li> | ||
<ItemButton onClick={() => dispatch(logout(navigate))}> | ||
로그아웃 | ||
</ItemButton> | ||
</li> | ||
</MenuUl> | ||
</MenuWrapDiv> | ||
); | ||
}); | ||
}; | ||
|
||
export default ProfileDropdown; |
2 changes: 0 additions & 2 deletions
2
src/components/Header/ProfileDropdown/ProfileDropdown.style.js
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
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
Oops, something went wrong.