Files
web-temp/layers/plugins/game-colors.client.ts
2025-09-16 19:44:29 +09:00

18 lines
406 B
TypeScript

export default defineNuxtPlugin(() => {
const { setGameColors } = useGameColors()
// 게임 데이터가 로드된 후 색상 설정
const gameDataStore = useGameDataStore()
// 게임 데이터가 변경될 때마다 색상 업데이트
watch(
() => gameDataStore.gameData,
newGameData => {
if (newGameData) {
setGameColors()
}
},
{ immediate: true }
)
})