diff --git a/app/pages/inspection/index.vue b/app/pages/inspection/index.vue index 1aa541e..fc158c5 100644 --- a/app/pages/inspection/index.vue +++ b/app/pages/inspection/index.vue @@ -99,9 +99,7 @@ variant="outlined" :platform="Platform" :class="[ - { 'flex-1': Platform === 'pc' }, - { 'flex-1': Platform !== 'pc' && !device.isDesktop }, - { 'no-text': !getButtonText(Platform) }, + getButtonText(Platform) ? 'flex-1' : 'no-text', 'size-extra-small md:size-small', ]" > @@ -227,18 +225,21 @@ const handleCommunityClick = () => { window.open(communityUrl.value, '_blank') } -const getButtonText = (platform: string) => { - const platformKeyMap: Record = { - pc: 'platform_pc', - google_play: 'platform_google_play', - app_store: 'platform_app_store', - } +const PLATFORM_LABEL_KEYS: Record = { + pc: 'platform_pc', + google_play: 'platform_google_play', + app_store: 'platform_app_store', +} - if (platform !== 'pc' && device.isDesktop) { +const getButtonText = (platform: PlatformTransformType) => { + // 데스크탭 환경에서 pc지원하는 경우 os 버튼 텍스트 미표시 + const isDesktopWithSinglePlatform = + device.isDesktop && platformType.value !== '2' && platform !== 'pc' + if (isDesktopWithSinglePlatform) { return '' } - const key = platformKeyMap[platform] + const key = PLATFORM_LABEL_KEYS[platform] return key ? tm(key) : '' }