23 lines
1019 B
TypeScript
23 lines
1019 B
TypeScript
// Metro module 15649 (f15650).
|
|
import { memo, useCallback } from "react";
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import InstantInvite, { LinkedChannelInvite } from "./InstantInvite";
|
|
const useStyles = createStyles({
|
|
container: {
|
|
position: "absolute",
|
|
opacity: 0
|
|
}
|
|
});
|
|
const r29 = memo(function InstantInviteSelfMeasurer(props) {
|
|
const { containerStyle, item, onMeasured, type = "height" } = props;
|
|
let c22286_1 = type;
|
|
return <View style={[containerStyle, useStyles().container]} onLayout={useCallback((a0) => {
|
|
const layout = a0.nativeEvent.layout;
|
|
onMeasured(c22286_1 === "height" ? layout.height : layout.width);
|
|
}, [onMeasured, type])} pointerEvents="none" importantForAccessibility="no-hide-descendants" accessibilityElementsHidden accessible={false}>
|
|
{item.type === "invite" ? <InstantInvite invite={item.data} /> : <LinkedChannelInvite channel={item.data} />}
|
|
</View>;
|
|
});
|
|
export default r29;
|