import Styles from "@/constants/Styles";
import { useEffect, useState } from "react";
import { Animated, Text, View } from "react-native";

export default function ProgressBar() {
   const [progress, setProgress] = useState(new Animated.Value(0));


   useEffect(() => {
      Animated.timing(progress, {
         // 100% = 255
         toValue: 127.5,
         duration: 1000,
         useNativeDriver: false
      }).start();
   }, []);

   return (
      <View style={Styles.wrapBar}>
         <Animated.View style={[Styles.contentBar, { width: progress }]} />
      </View>
   )
}