Skip to content

Commit

Permalink
[FE] refactor: AddGuildButton 컴포넌트 병합 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
zelkovaria committed Feb 14, 2025
1 parent 012d22f commit 5c90803
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 42 deletions.
21 changes: 0 additions & 21 deletions src/frontend/src/components/guild/AddGuildButton/index.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/frontend/src/components/guild/AddGuildButton/styles.ts

This file was deleted.

14 changes: 12 additions & 2 deletions src/frontend/src/components/guild/GuildList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import AddGuildButton from '../AddGuildButton';
import useModalStore from '@/stores/modalStore';

import CreateGuildModalContent from '../CreateGuildModalContent';

import * as S from './styles';

const GuildList = () => {
const { openModal } = useModalStore();

const handleChangeModal = () => {
openModal('basic', <CreateGuildModalContent />);
};

return (
<S.GuildList>
<S.DMButton>
<S.DiscordIcon size={32} />
</S.DMButton>
{/* 서버 리스트 추가 예정 */}
<AddGuildButton />
<S.AddGuildButton onClick={handleChangeModal}>
<S.PlusIcon size={24} />
</S.AddGuildButton>
<S.SearchCommunityButton>
<S.CompassIcon size={36} />
</S.SearchCommunityButton>
Expand Down
14 changes: 13 additions & 1 deletion src/frontend/src/components/guild/GuildList/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BiCompass } from 'react-icons/bi';
import { BsDiscord } from 'react-icons/bs';
import { TbPlus } from 'react-icons/tb';
import styled from 'styled-components';

export const GuildList = styled.nav`
Expand Down Expand Up @@ -30,7 +31,7 @@ export const DiscordIcon = styled(BsDiscord)`
color: ${({ theme }) => theme.colors.white};
`;

export const SearchCommunityButton = styled.button`
export const CircleButton = styled.button`
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -42,6 +43,17 @@ export const SearchCommunityButton = styled.button`
background-color: ${({ theme }) => theme.colors.dark[600]};
`;

export const AddGuildButton = styled(CircleButton)`
/* 버튼별 역할 구별을 위해 분리 */
`;
export const SearchCommunityButton = styled(CircleButton)`
/* 버튼별 역할 구별을 위해 분리 */
`;

export const PlusIcon = styled(TbPlus)`
color: ${({ theme }) => theme.colors.dark[400]};
`;

export const CompassIcon = styled(BiCompass)`
color: ${({ theme }) => theme.colors.dark[400]};
`;

0 comments on commit 5c90803

Please sign in to comment.