removed "entered" log, fixed loading symbol, implemented category update with editing

This commit is contained in:
thschleicher 2024-01-05 20:53:47 +01:00
parent 0ddfe3e606
commit 497c556a87
6 changed files with 25 additions and 14 deletions

View file

@ -1,15 +1,15 @@
import React, { useEffect, useRef } from "react";
import { StyleSheet, View, Animated, Easing, ActivityIndicator } from "react-native";
import { ActivityIndicator, Animated, Easing, StyleSheet, View } from "react-native";
import { useTheme } from "../../app/contexts/ThemeContext";
const LoadingSymbol = () => {
const color = ["blue", "red", "purple", "green", "yellow", "orange"];
const random = Math.floor(Math.random() * color.length);
const {colors} = useTheme();
const spinValue = useRef(new Animated.Value(0)).current;
const spin = spinValue.interpolate({
inputRange: [0, 1],
outputRange: ["0deg", "360deg"],
outputRange: [0, 360],
});
useEffect(() => {
@ -25,7 +25,6 @@ const LoadingSymbol = () => {
const styles = StyleSheet.create({
container: {
backgroundColor: color[random],
width: "100%",
height: "100%",
position: "absolute",
@ -35,13 +34,14 @@ const LoadingSymbol = () => {
loader: {
width: 100,
height: 100,
transform: [{ rotate: spin }],
transform: [{ rotate: spin + "deg"}],
zIndex: 999,
},
});
return (
<View style={styles.container}>
<ActivityIndicator size="large" color="black" style={styles.loader} />
<ActivityIndicator size="large" color={colors.accentColor} style={styles.loader} />
</View>
);
};