refactor. 게임 데이터 관련 상태 및 메타 태그 처리 개선
- 게임 데이터 스토어에서 상태 변수 이름 변경 및 추가 - 메타 태그 및 스타일 링크 생성 로직 간소화 - 코드 가독성 향상을 위한 함수 인자 제거
This commit is contained in:
@@ -12,13 +12,17 @@ export const useGameDataStore = defineStore('gameData', () => {
|
||||
gaCode: null as GameDataValue['ga_code'] | null,
|
||||
platformType: null as GameDataValue['platform_type'] | null,
|
||||
osType: null as GameDataValue['os_type'] | null,
|
||||
theme: null as 'light' | 'dark' | null,
|
||||
gameTheme: null as 'light' | 'dark' | null,
|
||||
gameMetaTag: null as GameDataValue['meta_tag_json'] | null,
|
||||
intro: null as GameDataValue['intro'] | null,
|
||||
imgJson: null as GameDataValue['img_json'] | null,
|
||||
snsJson: null as GameDataValue['sns_json'] | null,
|
||||
urlJson: null as GameDataValue['url_json'] | null,
|
||||
marketJson: null as GameDataValue['market_json'] | null,
|
||||
faviconJson: null as GameDataValue['favicon_json'] | null,
|
||||
gameFontJson: null as GameDataValue['game_font_json'] | null,
|
||||
fontFamily: null as GameDataValue['game_font_json']['font_family'] | null,
|
||||
keyColorJson: null as GameDataValue['key_color_json'] | null,
|
||||
gnb: null as GameDataValue['gnb'] | null,
|
||||
eventBanner: null as GameDataValue['event_banner'] | null,
|
||||
})
|
||||
@@ -36,13 +40,17 @@ export const useGameDataStore = defineStore('gameData', () => {
|
||||
state.gaCode = data?.ga_code
|
||||
state.platformType = data?.platform_type
|
||||
state.osType = data?.os_type
|
||||
state.theme = data?.design_theme === 1 ? 'light' : 'dark'
|
||||
state.gameTheme = data?.design_theme === 1 ? 'light' : 'dark'
|
||||
state.gameMetaTag = data?.meta_tag_json
|
||||
state.intro = data?.intro
|
||||
state.imgJson = data?.img_json
|
||||
state.snsJson = data?.sns_json
|
||||
state.urlJson = data?.url_json
|
||||
state.marketJson = data?.market_json
|
||||
state.faviconJson = data?.favicon_json
|
||||
state.gameFontJson = data?.game_font_json
|
||||
state.fontFamily = data?.game_font_json?.font_family
|
||||
state.keyColorJson = data?.key_color_json
|
||||
state.gnb = data?.gnb
|
||||
state.eventBanner = data?.event_banner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user