Skip to content

Commit

Permalink
Feature/#343 사이드바 로그인버튼 (#345)
Browse files Browse the repository at this point in the history
* design: objectfit

- #343

* fix: 사이드바 로그인 버튼

- #343

* fix: only open

- #332

---------

Co-authored-by: llddang <77055208+llddang@users.noreply.github.com>
  • Loading branch information
jasper200207 and llddang authored Nov 17, 2024
1 parent ae0cac9 commit 500b219
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/components/Sidebar/SidebarContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { MdOutlineLogout } from 'react-icons/md';

import { useGetSideBarInfoQuery } from '@/app/api/member';
import { defaultUserAtom, myTeamAtom, userAtom } from '@/atom';
import GoogleLoginButton from '@/containers/main/GoogleLoginButton';
import TeamModal from '@/containers/team/TeamModal';
import useGetUser from '@/hooks/useGetUser';

Expand Down Expand Up @@ -74,12 +75,16 @@ const SidebarContent = ({ isOpen, setIsOpen }: SidebarContentProps) => {
{user?.isLogin ? sidebarInfo?.body?.name : '비회원'}
</Text>
)}
<Flex direction={isOpen ? 'row' : 'column'} gap="4">
{/* TODO: 기능 완료하고 주석 풀기 */}
{/* <SidebarIconButton icon={<BiBell />} onClick={() => {}} />
<SidebarIconButton icon={<BiUser />} onClick={() => {}} /> */}
<SidebarIconButton icon={<MdOutlineLogout />} onClick={handleLogOutButtonClick} />
</Flex>
{user?.isLogin ? (
<Flex direction={isOpen ? 'row' : 'column'} gap="4">
{/* TODO: 기능 완료하고 주석 풀기 */}
{/* <SidebarIconButton icon={<BiBell />} onClick={() => {}} />
<SidebarIconButton icon={<BiUser />} onClick={() => {}} /> */}
<SidebarIconButton icon={<MdOutlineLogout />} onClick={handleLogOutButtonClick} />
</Flex>
) : (
isOpen && <GoogleLoginButton />
)}
</Flex>
{isOpen && user?.isLogin && (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/main/GoogleLoginButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const GoogleLoginButton = () => {
bgColor="transparent"
href={GOOGLE_LOGIN_URL}
>
<Image h="100%" alt="google_sign_in" src="/images/google_sign_in.png" />
<Image h="100%" objectFit="contain" alt="google_sign_in" src="/images/google_sign_in.png" />
</Button>
);
};
Expand Down

0 comments on commit 500b219

Please sign in to comment.