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

이미지 임포트 #719

Open
0gunkim opened this issue May 4, 2023 · 0 comments
Open

이미지 임포트 #719

0gunkim opened this issue May 4, 2023 · 0 comments

Comments

@0gunkim
Copy link
Contributor

0gunkim commented May 4, 2023

렌더페이지에서 여러 이미지들을 임포트해서 사용을 합니다.
문제는 리펙터링하면서 경로가 변경이 된다면 코드파일같은경우는 자동으로 경로까지 수정이 되지만 이미지는 랜덤입니다.
그리고 vscode기능인 바꾸기를 사용해도 변경되지 않은것들이 랜덤하게 있어서 컴포넌트마다 일일이 다시 확인해야 했습니다.

가독성이 안좋음 (절대경로 안되는 오류 해결해야됨)
이미지 임포트

assets에서 추상화 시키고 임포트한 코드

import {
   sub_img,
   seven_img,
   bg_six_one,
   bg_six_two,
   bg_two_left,
   bg_two_right,
   bg_six_three,
   seven_sub_img,
   bg_one_illust,
   seven_button,
} from "public/assets/render/index";

많은 줄을 차지함..

현재 백그라운드 이미지(그라이데이션), 아이콘들이 png확장명으로 만들어져 있습니다. 아이콘들은 svg로 리팩터링을 해서 차지하는 메모리를 조금더 줄이고 따로 공통된 것들을 컴포넌트별로 모아두고 유지보수할 때도 사용하는 컴포넌트들 안에서 변경하는게 아니라 일괄적으로 변경하도록 만들어야 할 것 같습니다.

확정된 디자인이 나온다면 2차 개선에서 구현하도록하겠습니다

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

No branches or pull requests

1 participant