fix. 게임스타드 platform_type 별 분리

This commit is contained in:
clkim
2025-12-09 15:14:36 +09:00
parent 5acd43af95
commit 67295a112c
3 changed files with 47 additions and 42 deletions

View File

@@ -23,21 +23,21 @@ const OS_TYPE_MAP: Record<string, string[]> = {
* OS 타입에 따라 가능한 플랫폼 목록을 반환합니다.
*/
export const getSupportedPlatforms = (
osType: OsType,
platformType: PlatformType
platformType: PlatformType,
osType: OsType
): string[] => {
const storePlatforms = OS_TYPE_MAP[osType] ?? []
const osTypes = OS_TYPE_MAP[osType] ?? []
switch (platformType) {
case '1': // PC 전용
return ['pc']
case '2': // 모바일 스토어 전용
return storePlatforms
return osTypes
default:
case '3': // PC + 모바일 스토어 모두
return ['pc', ...storePlatforms]
return ['pc', ...osTypes]
}
}