fix. 게임스타드 platform_type 별 분리
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user