mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 23:26:43 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
77 lines
1.5 KiB
TypeScript
77 lines
1.5 KiB
TypeScript
import React, { useEffect, useRef } from 'react';
|
|
import { Animated, View, StyleSheet, Dimensions } from 'react-native';
|
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
|
|
const { width: SCREEN_WIDTH } = Dimensions.get('window');
|
|
|
|
interface ShimmerPlaceholderProps {
|
|
style?: any;
|
|
shimmerColors?: string[];
|
|
children?: React.ReactNode;
|
|
}
|
|
|
|
export const ShimmerPlaceholder: React.FC<ShimmerPlaceholderProps> = ({
|
|
style,
|
|
shimmerColors,
|
|
children,
|
|
}) => {
|
|
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
|
|
useEffect(() => {
|
|
const animation = Animated.loop(
|
|
Animated.timing(animatedValue, {
|
|
toValue: 1,
|
|
duration: 1500,
|
|
useNativeDriver: true,
|
|
})
|
|
);
|
|
animation.start();
|
|
|
|
return () => {
|
|
animation.stop();
|
|
};
|
|
}, [animatedValue]);
|
|
|
|
const translateX = animatedValue.interpolate({
|
|
inputRange: [0, 1],
|
|
outputRange: [-SCREEN_WIDTH, SCREEN_WIDTH],
|
|
});
|
|
|
|
const defaultShimmerColors = [
|
|
'transparent',
|
|
'rgba(255, 255, 255, 0.05)',
|
|
'rgba(255, 255, 255, 0.1)',
|
|
'rgba(255, 255, 255, 0.05)',
|
|
'transparent',
|
|
];
|
|
|
|
return (
|
|
<View style={[styles.container, style]}>
|
|
{children}
|
|
<Animated.View
|
|
style={[
|
|
StyleSheet.absoluteFillObject,
|
|
{
|
|
transform: [{ translateX }],
|
|
},
|
|
]}
|
|
>
|
|
<LinearGradient
|
|
colors={shimmerColors || defaultShimmerColors}
|
|
start={{ x: 0, y: 0 }}
|
|
end={{ x: 1, y: 0 }}
|
|
style={styles.gradient}
|
|
/>
|
|
</Animated.View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
overflow: 'hidden',
|
|
},
|
|
gradient: {
|
|
flex: 1,
|
|
},
|
|
});
|