managarten/apps-archived/nutriphi/apps/mobile/components/camera/PhotoPreview.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
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>
2025-11-29 07:03:59 +01:00

64 lines
1.7 KiB
TypeScript

import React from 'react';
import { View, Text, Image, TouchableOpacity } from 'react-native';
import { Card } from '../ui/Card';
import { Button } from '../Button';
interface PhotoPreviewProps {
uri: string;
onRetake: () => void;
onUse: () => void;
isProcessing?: boolean;
}
export const PhotoPreview: React.FC<PhotoPreviewProps> = ({
uri,
onRetake,
onUse,
isProcessing = false,
}) => {
return (
<View className="flex-1 bg-black">
{/* Photo */}
<View className="flex-1 justify-center">
<Image source={{ uri }} className="h-full w-full" resizeMode="contain" />
</View>
{/* Controls */}
<View className="absolute bottom-0 left-0 right-0 bg-black/50 p-6">
<Card className="bg-white/90 backdrop-blur">
<View className="space-y-4">
<Text className="text-center text-lg font-semibold text-gray-900">
How does this look?
</Text>
<Text className="text-center text-sm text-gray-600">
Make sure your food is clearly visible and well-lit for the best analysis results.
</Text>
<View className="flex-row space-x-3">
<TouchableOpacity
onPress={onRetake}
disabled={isProcessing}
className={`
flex-1 items-center rounded-lg border-2 px-4 py-3
${isProcessing ? 'border-gray-300 bg-gray-100' : 'border-gray-300 bg-white'}
`}
>
<Text className={`font-medium ${isProcessing ? 'text-gray-400' : 'text-gray-700'}`}>
Retake
</Text>
</TouchableOpacity>
<Button
title={isProcessing ? 'Analyzing...' : 'Use Photo'}
onPress={onUse}
disabled={isProcessing}
className="flex-1"
/>
</View>
</View>
</Card>
</View>
</View>
);
};