From 037a74fb566ed0250f89123dcbefb8389905ba0b Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Wed, 4 Oct 2023 15:12:55 -0300 Subject: [PATCH] remove loading --- app/containers/AudioPlayer/Loading.tsx | 32 ----------------------- app/containers/AudioPlayer/PlayButton.tsx | 4 +-- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 app/containers/AudioPlayer/Loading.tsx diff --git a/app/containers/AudioPlayer/Loading.tsx b/app/containers/AudioPlayer/Loading.tsx deleted file mode 100644 index 90acf2c53..000000000 --- a/app/containers/AudioPlayer/Loading.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React, { useEffect } from 'react'; -import Animated, { Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated'; - -import { CustomIcon } from '../CustomIcon'; -import { useTheme } from '../../theme'; - -const Loading = () => { - const rotation = useSharedValue(0); - const { colors } = useTheme(); - - useEffect(() => { - rotation.value = withRepeat( - withTiming(360, { - duration: 1000, - easing: Easing.inOut(Easing.linear) - }), - -1 - ); - }, []); - - const animatedStyle = useAnimatedStyle(() => ({ - transform: [{ rotate: `${rotation.value}deg` }] - })); - - return ( - - - - ); -}; - -export default Loading; diff --git a/app/containers/AudioPlayer/PlayButton.tsx b/app/containers/AudioPlayer/PlayButton.tsx index 7b2c0a0e0..5003dabae 100644 --- a/app/containers/AudioPlayer/PlayButton.tsx +++ b/app/containers/AudioPlayer/PlayButton.tsx @@ -4,7 +4,7 @@ import Touchable from '../message/Touchable'; import { CustomIcon } from '../CustomIcon'; import { useTheme } from '../../theme'; import styles from './styles'; -import Loading from './Loading'; +import RCActivityIndicator from '../ActivityIndicator'; interface IButton { loading: boolean; @@ -34,7 +34,7 @@ const PlayButton = React.memo(({ loading, paused, onPress, disabled, isReadyToPl background={Touchable.SelectableBackgroundBorderless()} > {loading ? ( - + ) : ( )}