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

이미지에 에러나거나 로드 안될 시 기본 이미지 렌더링 #210

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SDWoo
Copy link
Collaborator

@SDWoo SDWoo commented May 3, 2023

📖 구현 내용

  • deafult Image 상수 분리
  • onError, load 되지 않으면 default image 띄워주기

🖼 구현 이미지

image

✅ PR 포인트 & 궁금한 점

  • 사당 전주 식당은 http 오류라 배포에서만 테스트가 가능해서 아직 확인이 안되는데 안되면 다시 고쳐보겠습니다!

@SDWoo SDWoo added the Refactor 유형: 리팩터링 label May 3, 2023
@SDWoo SDWoo requested review from live-small and metacode22 May 3, 2023 08:57
@SDWoo SDWoo self-assigned this May 3, 2023
Copy link
Collaborator

@metacode22 metacode22 left a comment

Choose a reason for hiding this comment

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

구웃~

Comment on lines +98 to +99
fallbackStrategy={'onError' || 'beforeLoadOrError'}
fallbackSrc={DEFAULT_IMAGE}
Copy link
Member

Choose a reason for hiding this comment

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

오호 chakra image props에 이런 게 있었구나 👍

Comment on lines +1 to +2
export const DEFAULT_IMAGE = '/images/default-restaurant.svg';

Copy link
Member

Choose a reason for hiding this comment

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

p3;
foodParty.ts에 DEFAULT_IMAGE라고 하면, 밥모임에 대한 기본이미지라고 오해할 수도 있을 거 같아요!
가게에 대한 이미지가 없을 때 보여주는 이미지 맞죠? 조금 더 구체적인 변수명으로 설정하는 건 어떨까요?
ex) DEFAULT_RESTAURANT_IMAGE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor 유형: 리팩터링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants