fix: 홈 화면에 추가를 PC Chrome·Edge(설치창을 띄울 수 있는 브라우저)에서도 보이게, PC Safari·Firefox 에선 숨김

This commit is contained in:
minaChoi committed 2026-10-21 09:10:10 +09:00
1 parent 77d29ce24f
commit c788430fa7
3 files changed
+16 -8

No files matched your search

+7 -2
View File
@@ -37,8 +37,13 @@ export function platform(): Platform {
return 'other'
}
/** 휴대폰에서만 홈 화면 추가를 권한다 (PC 는 안 보임) */
export const onPhone = () => ['ios', 'android', 'inapp'].includes(platform())
const onPhone = () => ['ios', 'android', 'inapp'].includes(platform())
/** 설치를 권할 곳: 휴대폰 브라우저, 그리고 설치창을 띄울 수 있는 PC 브라우저(Chrome·Edge). PC Safari·Firefox 와 이미 설치해 연 화면은 뺀다 */
export function useInstallable() {
const canPrompt = useCanPrompt()
return platform() !== 'standalone' && (onPhone() || canPrompt)
}
/** 설치창을 바로 띄울 수 있는지 (안드로이드 Chrome 등) */
export function useCanPrompt() {