From 5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 25 Jan 2024 15:33:23 -0800 Subject: Add account-activation queueing to signup (#2613) * Add deactivated-account tracking * Center button text * Add Deactivated screen * Add icon to Deactivated screen * Abort session resumption if the session is deactivated * Implement deactivated screen status checks * Bump api@0.9.5 * Use new typo-fixed scope * UI refinements --- src/components/Loader.tsx | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/components/Loader.tsx (limited to 'src/components/Loader.tsx') diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx new file mode 100644 index 000000000..bbe4e2f75 --- /dev/null +++ b/src/components/Loader.tsx @@ -0,0 +1,41 @@ +import React from 'react' +import Animated, { + Easing, + useSharedValue, + useAnimatedStyle, + withRepeat, + withTiming, +} from 'react-native-reanimated' + +import {atoms as a} from '#/alf' +import {Props, useCommonSVGProps} from '#/components/icons/common' +import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' + +export function Loader(props: Props) { + const common = useCommonSVGProps(props) + const rotation = useSharedValue(0) + + const animatedStyles = useAnimatedStyle(() => ({ + transform: [{rotate: rotation.value + 'deg'}], + })) + + React.useEffect(() => { + rotation.value = withRepeat( + withTiming(360, {duration: 500, easing: Easing.linear}), + -1, + ) + }, [rotation]) + + return ( + + + + ) +} -- cgit 1.4.1