From 5a345f710693920036cc79165a841514ae50b2de Mon Sep 17 00:00:00 2001 From: Junseo Kim Date: Sun, 25 Jan 2026 19:04:29 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20WebView=20=EC=95=88=EC=A0=84=20?= =?UTF-8?q?=EC=98=81=EC=97=AD(Safe=20Area)=20=EB=8C=80=EC=9D=91=EC=9D=84?= =?UTF-8?q?=20=EC=9C=84=ED=95=9C=20CSS=20=EB=B3=80=EC=88=98=20=EC=A3=BC?= =?UTF-8?q?=EC=9E=85=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(?= =?UTF-8?q?=EA=B8=B0=EA=B8=B0=EB=B3=84=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EB=B6=88=EC=9D=BC=EC=B9=98=20=ED=95=B4=EA=B2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/club-detail/club-detail-screen.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ui/club-detail/club-detail-screen.tsx b/ui/club-detail/club-detail-screen.tsx index db63628..e1baf33 100644 --- a/ui/club-detail/club-detail-screen.tsx +++ b/ui/club-detail/club-detail-screen.tsx @@ -15,7 +15,7 @@ import { Platform, TouchableOpacity } from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; +import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context"; import { WebView } from "react-native-webview"; import styled from "styled-components/native"; @@ -28,6 +28,7 @@ export default function ClubWebViewScreen() { const { isSubscribed, toggleSubscribe } = useSubscribedClubsContext(); const { sessionId } = useMixpanelContext(); const trackEvent = useMixpanelTrack(); + const insets = useSafeAreaInsets(); const webviewUrl = process.env.EXPO_PUBLIC_WEBVIEW_URL; @@ -139,6 +140,14 @@ export default function ClubWebViewScreen() { await toggleSubscribe(targetId); }, }); + + const injectJS = ` + (function() { + document.documentElement.style.setProperty('--rn-safe-top', '${insets.top}px'); + document.documentElement.style.setProperty('--rn-safe-bottom', '${insets.bottom}px'); + })(); + true; + `; return ( @@ -171,6 +180,9 @@ export default function ClubWebViewScreen() { onLoadEnd={handleLoadEnd} onError={handleError} onMessage={handleMessage} + injectedJavaScript={injectJS} + contentInsetAdjustmentBehavior="never" + automaticallyAdjustContentInsets={false} startInLoadingState={false} scalesPageToFit={true} showsHorizontalScrollIndicator={false}