eletrotupi / tcc/ commit / e8826b4

frontend: narrow the color scheme before indexing header colors

Pedro Lucas Porcellis porcellis@eletrotupi.com · 12 days ago e8826b4915d2fdf3653a2557c7d783db8688640d Browse files
Parents d09369f
Changed files
1
Additions
+1
Deletions
-1
frontend/components/misc/parallax-scroll-view.tsx
1 1
import type { PropsWithChildren, ReactElement } from 'react';
2 2
import { StyleSheet } from 'react-native';
3 3
import Animated, {
4 4
  interpolate,
5 5
  useAnimatedRef,
22 22
  children,
23 23
  headerImage,
24 24
  headerBackgroundColor,
25 25
}: Props) {
26 26
  const backgroundColor = useThemeColor({}, 'background');
27 -
  const colorScheme = useColorScheme() ?? 'light';
27 +
  const colorScheme = useColorScheme() === 'dark' ? 'dark' : 'light';
28 28
  const scrollRef = useAnimatedRef<Animated.ScrollView>();
29 29
  const scrollOffset = useScrollOffset(scrollRef);
30 30
  const headerAnimatedStyle = useAnimatedStyle(() => {
31 31
    return {
32 32
      transform: [
75 75
    padding: 32,
76 76
    gap: 16,
77 77
    overflow: 'hidden',
78 78
  },
79 79
});