Skip to content

Commit

Permalink
feat: behance property 유무에 따른 아이콘 렌더링
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzoo committed Sep 7, 2024
1 parent 0e5b036 commit c1fed68
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
12 changes: 12 additions & 0 deletions src/assets/icons/ic_behance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 10 additions & 12 deletions src/views/AboutPage/components/Member/Card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import { ReactComponent as IcBehance } from '@src/assets/icons/ic_behance.svg';
import { ReactComponent as IcGithub } from '@src/assets/icons/ic_github.svg';
import { ReactComponent as IcLinkedin } from '@src/assets/icons/ic_linkedin.svg';
import { ReactComponent as IcMail } from '@src/assets/icons/mail.svg';
import NullImage from '@src/assets/images/null_image.png';
import { PositionType } from '@src/lib/types/about';
import { MemberType } from '@src/lib/types/about';
import * as St from './style';

type MeberCardProps = {
name: string;
position: PositionType;
description?: string;
currentProject: string;
imageSrc?: string;
gmail?: string;
linkedin?: string;
github?: string;
};
type MemberCardProps = Omit<MemberType, 'id'>;

const MemberCard = ({
name,
Expand All @@ -25,7 +17,8 @@ const MemberCard = ({
gmail,
linkedin,
github,
}: MeberCardProps) => {
behance,
}: MemberCardProps) => {
return (
<St.Card>
<St.ImageWrapper>
Expand Down Expand Up @@ -58,6 +51,11 @@ const MemberCard = ({
<IcGithub />
</St.AnchorIconWrapper>
)}
{behance && (
<St.AnchorIconWrapper href={`https://www.behance.net/${behance}`} target="_blank">
<IcBehance />
</St.AnchorIconWrapper>
)}
</St.LinkWrapper>
</St.Card>
);
Expand Down
2 changes: 2 additions & 0 deletions src/views/AboutPage/components/Member/Section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const MemberSection = ({ generation, members }: MemberSectionProps) => {
gmail,
linkedin,
github,
behance,
}) => (
<MemberCard
key={id}
Expand All @@ -52,6 +53,7 @@ const MemberSection = ({ generation, members }: MemberSectionProps) => {
gmail={gmail}
linkedin={linkedin}
github={github}
behance={behance}
/>
),
)}
Expand Down

0 comments on commit c1fed68

Please sign in to comment.