fix. api 수정 반영, getImageHost 수정
This commit is contained in:
@@ -28,18 +28,18 @@ export const getImageHost = (
|
||||
const { imageType = 'game' } = options
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV === 'development'
|
||||
const isCommon = imageType === 'common'
|
||||
const isTypeGame = imageType === 'game'
|
||||
|
||||
// * [TODO] 수정 필요 : 게임별 이미지 로컬에 추가 필요.
|
||||
if (!isCommon) {
|
||||
if (isTypeGame) {
|
||||
return `${staticUrl}${path}`
|
||||
}
|
||||
|
||||
// 개발 환경일 때는 루트 경로 생략
|
||||
if (isDevelopment) return path
|
||||
|
||||
// 공통/게임 여부에 따른 경로 결정
|
||||
const basePath = isCommon ? assetsUrl : staticUrl
|
||||
// 게임/공통 여부에 따른 경로 결정
|
||||
const basePath = isTypeGame ? staticUrl : assetsUrl
|
||||
|
||||
return `${basePath}${path}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user