[SHOPTIME-2393] Home / top / today's deals / 부자연스러운 폰트 서식 변경

추가수정

Loading 패널 랜더링시 앱에서 사용하는 모든 폰트 미리 다운로드 하도록
수정
This commit is contained in:
yonghyon
2024-10-16 12:02:31 +09:00
parent d2e03d39eb
commit ae2d916711
2 changed files with 43 additions and 29 deletions

View File

@@ -205,7 +205,17 @@ export default function LoadingPanel({ showLoadingPanel, ...rest }) {
const renderImages = useCallback(() => {
switch (loadingType) {
case "launching":
case "launching": {
const fontMap = [
css.smart300,
css.smart400,
css.smart500,
css.smart600,
css.smart700,
css.arial,
css.arialBold,
css.arialBlack,
];
return (
<>
{deviceCountryCode === "RU" ? ( // RU loading image
@@ -227,13 +237,14 @@ export default function LoadingPanel({ showLoadingPanel, ...rest }) {
/>
)
)}
<div className={css.baseFontLoading}>fontLoading</div>
<div className={css.arialFontLoading}>fontLoading</div>
<div className={css.arialBlackFontLoading}>fontLoading</div>
<div className={css.arialFontBoldLoading}>fontLoading</div>
{fontMap.map((layout, index) => (
<div key={"font" + index} className={classNames(css.fontLoading, layout)}>
fontLoading
</div>
))}
</>
);
}
case "wait":
return <Loader />;

View File

@@ -39,31 +39,34 @@
width: 100vw;
height: 100vh;
}
.baseFontLoading {
font-family: @baseFont;
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.arialFontLoading {
font-family: @arialFont;
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.arialBlackFontLoading {
font-family: @arialBlack;
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.arialFontBoldLoading {
font-family: @arialFontBold;
.fontLoading {
position: absolute;
top: 0;
left: 0;
opacity: 0;
&.smart300 {
font-family: "LG Smart";
font-weight: 300;
}
&.smart400 {
font-family: "LG Smart";
font-weight: 400;
}
&.smart600 {
font-family: "LG Smart";
font-weight: 600;
}
&.smart700 {
font-family: "LG Smart";
font-weight: 700;
}
&.arial {
font-family: "Arial";
}
&.arialBold {
font-family: "ArialBold";
}
&.arialBlack {
font-family: "ArialBlack";
}
}