This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from "react"; | |
import { StyleSheet, View } from "react-native"; | |
import Animated, { | |
useAnimatedStyle, | |
useSharedValue | |
} from "react-native-reanimated"; | |
import { viewPort } from "@project/utils"; | |
const BALL_SIZE = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef, useEffect } from 'react'; | |
import { Animated, Easing } from 'react-native'; | |
import { useIsMounted } from '@t/utils/hooks/useIsMounted'; | |
export const useEyesAnimation = () => { | |
const offsetX = useRef(new Animated.Value(0)).current; | |
const isMounted = useIsMounted(); | |
useEffect(() => { | |
animate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insertAt(string, subString, position) { | |
const before = string.substr(0, position); | |
const after = string.substr(position); | |
return `${before}${subString}${after}`; | |
} | |
/** | |
* Crude, but reliable way to do a substring with unicode chars. We tried other | |
* solutions but they don't work with the flags which are 4 code points! | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef, useEffect, useCallback } from 'react'; | |
import { Animated, Easing } from 'react-native'; | |
import { pickOne } from '@t/utils/pickOne'; | |
import { MelonHalf, MelonQuarter } from '@t/components/Icons'; | |
const MelonEmitter = ({ runAnimation }) => { | |
const numberOfMelons = 20; | |
const driver = useRef(new Animated.Value(0)).current; | |
const colors = useRef(['#FFA0B4', '#F1DBDF', '#FFE4E9', '#BCFF4F']).current; | |
const svgs = [MelonQuarter, MelonHalf]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quicker bi-directional onViewableItemsChanged | |
const [activeIndex, setActiveIndex] = useState(0); | |
const onViewableItemsChanged = useRef(({ viewableItems, changed }) => { | |
if (viewableItems?.length >= 2 && changed?.[0]?.isViewable) { | |
setActiveIndex(changed?.[0].index); | |
} else { | |
if (viewableItems?.[0]) setActiveIndex(viewableItems[0].index); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { View } from 'react-native'; | |
import { useComponentSize } from './useComponentSize'; | |
const Component = () => { | |
const [size, onLayout] = useComponentSize(); | |
return ( | |
<View onLayout={onLayout} /> | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Box, Text } from "@app/Components"; ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef, useState } from 'react'; | |
import { Animated, FlatList, StyleSheet } from 'react-native'; | |
import { Box, Button, Text, Touchable } from '@app/components'; | |
import { Colors, Grid, Sizes } from '@app/utils/const/theme'; | |
import { viewPort } from '@app/utils'; | |
const initialPosition = viewPort.height.full - 300; | |
const MapSheet = ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useRef } from "react"; | |
import { Dimensions, View } from "react-native"; | |
import Animated, { useSharedValue, withTiming, useAnimatedStyle, useAnimatedProps } from "react-native-reanimated"; | |
import Svg, { Polygon } from 'react-native-svg' | |
const { width, height } = Dimensions.get('window'); | |
const MAXBALLS = 100; | |
const BALL_SIZE = 10; | |
const ballsArray = [...Array(MAXBALLS)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, { onGestureEvent, useSharedValue, withTiming, withDecay, withSpring, useAnimatedStyle, interpolate, Easing, Extrapolate, interpolateColor, useAnimatedGestureHandler } from "react-native-reanimated"; | |
import { PanGestureHandler } from 'react-native-gesture-handler'; | |
import { Dimensions, StyleSheet, View } from "react-native"; | |
import React, { useEffect, useRef } from "react"; | |
import { useCreditCard } from "./Hooks/useCreditCard"; | |
import { Card } from './Shared/Card'; | |
const { width, height } = Dimensions.get('window'); | |
export default function FirstLook(props) { |
NewerOlder