Skip to content

Commit

Permalink
refactor: default image SVG 컴포넌트 대신 PNG 파일로 export 하여 ImageView 컴포넌트와…
Browse files Browse the repository at this point in the history
… 활용하여 사용
  • Loading branch information
semnil5202 committed Mar 15, 2024
1 parent 57fdac0 commit 41e6348
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
Binary file added src/assets/image/default_profile_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/image/default_profile_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions src/assets/svg/profile/profile_image_default.svg

This file was deleted.

5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import PNGAgreementBackground from './assets/image/agreement_bg.png';
import PNGBottomBackground from './assets/image/bottom_bg.png';
import PNGDefaultProfileIcon from './assets/image/default_profile_icon.png';
import PNGDefaultProfileImage from './assets/image/default_profile_image.png';
import PNGErrorBackground from './assets/image/error_back.png';
import PNGIdeaBackground1 from './assets/image/idea_back_1.png';
import PNGIdeaBackground2 from './assets/image/idea_back_2.png';
Expand Down Expand Up @@ -85,7 +87,6 @@ export { ReactComponent as SVGFeedUnLike } from './assets/svg/feed/unlike.svg';
export { ReactComponent as SVGFeedUnScrap } from './assets/svg/feed/unscrap.svg';
export { ReactComponent as SVGMore24 } from './assets/svg/feed/more.svg';

export { ReactComponent as SVGProfileDefaultImage } from './assets/svg/profile/profile_image_default.svg';
export { ReactComponent as SVGProfileMessageDots } from './assets/svg/profile/message_dots_circle.svg';
export { ReactComponent as SVGProfileBookOpen } from './assets/svg/profile/book_open.svg';

Expand Down Expand Up @@ -123,4 +124,6 @@ export {
PNGIdeaBackground4,
PNGIdeaBackground5,
PNGErrorBackground,
PNGDefaultProfileIcon,
PNGDefaultProfileImage,
};
16 changes: 16 additions & 0 deletions src/stories/PNGCommon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Meta, StoryObj } from '@storybook/react';
import {
PNGAgreementBackground,
PNGBottomBackground,
PNGDefaultProfileIcon,
PNGDefaultProfileImage,
PNGIdeaBackground1,
PNGIdeaBackground2,
PNGIdeaBackground3,
Expand Down Expand Up @@ -67,6 +69,20 @@ export const Default: Story = {
alt="PNGIdeaBackground5"
/>
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '20px' }}>
<img
width={420}
height={420}
src={PNGDefaultProfileImage}
alt="PNGDefaultProfileImage"
/>
<img
width={60}
height={60}
src={PNGDefaultProfileIcon}
alt="PNGDefaultProfileIcon"
/>
</div>
</div>
),
};
7 changes: 1 addition & 6 deletions src/stories/SVGProfile.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';

import {
SVGProfileBookOpen,
SVGProfileDefaultImage,
SVGProfileMessageDots,
} from '../.';
import { SVGProfileBookOpen, SVGProfileMessageDots } from '../.';

const meta = {
title: 'Assets/SVG/Profile',
Expand All @@ -17,7 +13,6 @@ type Story = StoryObj<object>;
export const Default: Story = {
render: () => (
<div style={{ display: 'flex', gap: '20px' }}>
<SVGProfileDefaultImage />
<SVGProfileBookOpen />
<SVGProfileMessageDots />
</div>
Expand Down

0 comments on commit 41e6348

Please sign in to comment.