|
@@ -80,6 +80,22 @@ export function useSafeAreaFrame(): Rect {
|
80
|
80
|
* @deprecated
|
81
|
81
|
*/
|
82
|
82
|
export function useSafeArea(): EdgeInsets {
|
83
|
|
- console.warn('useSafeArea is deprecated, use useSafeAreaInsets instead.');
|
|
83
|
+ React.useEffect(() => {
|
|
84
|
+ console.warn('useSafeArea is deprecated, use useSafeAreaInsets instead.');
|
|
85
|
+ }, []);
|
84
|
86
|
return useSafeAreaInsets();
|
85
|
87
|
}
|
|
88
|
+
|
|
89
|
+/**
|
|
90
|
+ * @deprecated
|
|
91
|
+ */
|
|
92
|
+export function SafeAreaConsumer(
|
|
93
|
+ props: React.ComponentProps<typeof SafeAreaInsetsContext.Consumer>,
|
|
94
|
+) {
|
|
95
|
+ React.useEffect(() => {
|
|
96
|
+ console.warn(
|
|
97
|
+ 'SafeAreaConsumer is deprecated, use SafeAreaInsetsContext.Consumer instead.',
|
|
98
|
+ );
|
|
99
|
+ }, []);
|
|
100
|
+ return <SafeAreaInsetsContext.Consumer {...props} />;
|
|
101
|
+}
|