import * as React from 'react'; import { interpolate } from 'react-native-reanimated'; import Carousel from 'rn-animated-carousel'; import type { TAnimationStyle } from '../../../src/layouts/BaseLayout'; import { window } from '../constants'; import { useHeaderHeight } from '@react-navigation/elements'; import { Text, View } from 'react-native-ui-lib'; import { BlurView } from 'expo-blur'; import { faker } from '@faker-js/faker'; import { Image } from 'react-native'; function Index() { const headerHeight = useHeaderHeight(); const scale = 0.9; const RIGHT_OFFSET = window.width * (1 - scale); const ITEM_WIDTH = window.width * scale; const ITEM_HEIGHT = 120; const PAGE_HEIGHT = window.height - headerHeight; const PAGE_WIDTH = window.width; const animationStyle: TAnimationStyle = React.useCallback( (value: number) => { 'worklet'; const translateY = interpolate( value, [-1, 0, 1], [-ITEM_HEIGHT, 0, ITEM_HEIGHT] ); const right = interpolate( value, [-1, -0.2, 1], [RIGHT_OFFSET / 2, RIGHT_OFFSET, RIGHT_OFFSET / 3] ); return { transform: [{ translateY }], right, }; }, [RIGHT_OFFSET] ); return ( { return (