Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// this.setState({result: 'shared with an activityType: ' + result.activityType});
// } else {
// this.setState({result: 'shared'});
// }
// } else if (result.action === Share.dismissedAction) {
// this.setState({result: 'dismissed'});
// }
};
const select = () => {
// props.setCharacter(characters[currentIndex]);
dismiss();
};
const { top, bottom, left, right } = useSafeArea();
const imageStyle = { width: 60, height: 48 };
return (
function Score({ gameOver, score, highScore, ...props }) {
React.useEffect(() => {
if (gameOver) {
if (score > highScore) {
// setHighScore(score);
}
}
}, [gameOver])
const { top, left } = useSafeArea();
return (
export default function RunnerError({ children }) {
const { top } = useSafeArea();
return (
);
}
const MenuButton = () => {
const insets = useSafeArea();
return (
export default function LicensesScreen({ navigation }) {
const [top, left, bottom, right] = useSafeArea();
return (
activeTintColor,
activeBackgroundColor,
inactiveTintColor,
inactiveBackgroundColor,
getLabel,
renderIcon,
onItemPress,
itemsContainerStyle,
itemStyle,
labelStyle,
activeLabelStyle,
inactiveLabelStyle,
iconContainerStyle,
drawerPosition,
}: DrawerNavigationItemsProps) => {
const insets = useSafeArea();
return (
export default ({ y, tabs, scrollView }: HeaderProps) => {
const { goBack } = useNavigation();
const [toggle] = useValues<0 | 1>([0], []);
const insets = useSafeArea();
const transition = withTimingTransition(toggle, { duration: 100 });
const { top: paddingTop } = insets;
const translateX = interpolate(y, {
inputRange: [0, HEADER_IMAGE_HEIGHT],
outputRange: [-ICON_SIZE - PADDING, 0],
extrapolate: Extrapolate.CLAMP
});
const translateY = interpolate(y, {
inputRange: [-100, 0, HEADER_IMAGE_HEIGHT],
outputRange: [
HEADER_IMAGE_HEIGHT - MIN_HEADER_HEIGHT + 100,
HEADER_IMAGE_HEIGHT - MIN_HEADER_HEIGHT,
0
],
extrapolateRight: Extrapolate.CLAMP
});
function Demo() {
const insets = useSafeArea();
return (
);
}
if (!hasShownTitle) {
hasShownTitle = true;
InteractionManager.runAfterInteractions(_ => {
Animated.timing(animation, {
toValue: 1,
duration: 800,
delay: 0,
easing: Easing.in(Easing.qubic),
}).start();
});
}
}, []);
const { top, bottom, left, right } = useSafeArea();
const animatedTitleStyle = {
transform: [
{
translateX: animation.interpolate({
inputRange: [0, 1],
outputRange: [-Dimensions.get('window').width, 0],
}),
},
{
translateY: animation.interpolate({
inputRange: [0, 1],
outputRange: [-100, 0],
}),
},
],
function App() {
const [text, setText] = React.useState(
'Change code in the editor and watch it change on your phone! Save to get a shareable url.'
);
const realColorScheme = useColorScheme();
const [show, setShow] = React.useState(true);
const [colorScheme, setScheme] = React.useState(realColorScheme);
const {
top: paddingTop,
bottom: paddingBottom,
left,
right: paddingRight,
} = useSafeArea();
const paddingLeft = left || 12;
const isDark = colorScheme === 'dark';
const textColor = isDark ? 'white' : 'black';
const borderColor = isDark ? 'rgba(255,255,255,0.2)' : 'rgba(0,0,0,0.2)';
const backgroundColor = isDark ? '#000' : '#ecf0f1';
const isTabletOrMobileDevice = useMediaQuery({
query: '(orientation: landscape)',
});
const drawerWidth =
Dimensions.get('window').width * (isTabletOrMobileDevice ? 0.45 : 1);
const drawerRight = show ? drawerWidth : 0;