Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
// Module ID: 4697
|
|
// Function ID: 4698
|
|
// Name: useBaseAppContainerDimensions
|
|
// Dependencies: [19, 1479, 1613, 2]
|
|
// Exports: default, getBaseAppContainerDimensions
|
|
|
|
// Module 4697 (useBaseAppContainerDimensions)
|
|
import useWindowDimensions from "useWindowDimensions" /* 1479 */;
|
|
import useSafeAreaInsets from "useSafeAreaInsets" /* 1613 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const useWindowDimensionsDefault = useWindowDimensions;
|
|
const useSafeAreaInsetsDefault = useSafeAreaInsets;
|
|
|
|
require = fn;
|
|
let size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/screen/native/useBaseAppContainerDimensions.tsx");
|
|
|
|
export default function useBaseAppContainerDimensions() {
|
|
let size = useWindowDimensionsDefault();
|
|
const width = size.width;
|
|
const height = size.height;
|
|
const rect = useSafeAreaInsetsDefault();
|
|
const left = rect.left;
|
|
const right = rect.right;
|
|
const items = [width, height, left, right];
|
|
return noop.useMemo(() => {
|
|
const size = { width: width - left - right, height };
|
|
return size;
|
|
}, items);
|
|
};
|
|
export const getBaseAppContainerDimensions = function getBaseAppContainerDimensions() {
|
|
const windowDimensions = useWindowDimensions.getWindowDimensions();
|
|
({ width, height } = windowDimensions);
|
|
const rect = useSafeAreaInsets.getSafeAreaInsets();
|
|
const size = { width: width - rect.left - rect.right, height };
|
|
return size;
|
|
};
|