We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 250cd9d commit beb054fCopy full SHA for beb054f
1 file changed
โsrc/main.tsxโ
@@ -25,6 +25,21 @@ if ('serviceWorker' in navigator) {
25
})
26
}
27
28
+// ์ํ ํ์์ค ์คํ์ผ ๋คํฌ๋ชจ๋ ๋์
29
+const updateStatusBarStyle = () => {
30
+ const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches
31
+ const metaTag = document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]')
32
+ if (metaTag) {
33
+ metaTag.setAttribute('content', isDark ? 'black-translucent' : 'default')
34
+ }
35
+}
36
+
37
+// ์ด๊ธฐ ์ค์
38
+updateStatusBarStyle()
39
40
+// ๋คํฌ๋ชจ๋ ๋ณ๊ฒฝ ๊ฐ์ง
41
+window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', updateStatusBarStyle)
42
43
// PWA ์ฐฝ ํฌ๊ธฐ ์ ์ด
44
if (window.matchMedia('(display-mode: standalone)').matches) {
45
// PWA ๋ชจ๋์์ ์คํ ์ค์ผ ๋
0 commit comments