Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/#318 : 꿀팁 페이지 라우팅 추가 & 홈 화면 디자인 수정 #322

Merged
merged 18 commits into from
Feb 6, 2024

Conversation

hwinkr
Copy link
Collaborator

@hwinkr hwinkr commented Feb 5, 2024

🤠 개요

💫 설명

  • 꿀팁 페이지 라우팅 카드를 추가 했어요
    • InformHalfCard 컴포넌트를 재사용하기 위해서 render props를 활용했어요
interface InformHalfCardProps extends React.HTMLAttributes<HTMLDivElement> {
  asset: () => JSX.Element;
  title: string;
  subTitle: string;
}

const InformHalfCard = ({
  asset,
  title,
  subTitle,
  ...props
}: InformHalfCardProps) => {
  return (
    <Container {...props}>
      {asset()}
	  //...
    </Container>
  );
};

이렇게 한 이유는

  • 채용, 어학 정보 카드 컴포넌트는 Icon 컴포넌트 사용
  • 꿀팁 페이지 카드 컴포넌트는 Image 컴포넌트 사용

두 종류의 카드 컴포넌트의 UI가 동일한데 다른 에셋을 사용한다고 해서 두개의 컴포넌트를 따로 만들고 싶지 않아서 render props를 활용했어요

  • WebpImage 컴포넌트를 추가로 구현해서 재사용할 수 있도록 했어요 (TipImage) 컴포넌트에서 재사용중이에요
  • 홈 화면에서 사용하는 카드 컴포넌트들의 배경색을 IVORY에서 WHITE로 변경했어요, box-shadow를 사용해서 배경과 구분해요

📷 스크린샷 (Optional)

image

hwinkr added 16 commits February 5, 2024 16:15
- 채용, 어학, 꿀팁 카드의 UI가 비슷해 재활용 할 수 있도록 리팩토링 진행
- asset props는 render props로써 외부에서 주입 하는 JSX를 반환하는 컴포넌트를 props로 받아 렌더링하기 때문에 유연하게 사용할 수 있게 됨.
@hwinkr hwinkr requested a review from pp449 February 5, 2024 08:32
@hwinkr hwinkr self-assigned this Feb 5, 2024
Copy link
Member

@pp449 pp449 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#320 추가 반영 부탁드려요~

@hwinkr hwinkr merged commit 75b3b4a into dev Feb 6, 2024
1 check passed
@hwinkr hwinkr deleted the chore/#318 branch February 6, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chore: 건의사항, 꿀팁 페이지 라우팅 추가 & 홈 화면 디자인 수정
2 participants