caelum0x 6ee7ff4033 fix(ritgram): rebrand Gitgram->Ritgram everywhere user-visible, fix OG/sitemap base URL, real 404s
- sitemap.xml, robots.txt, og:url, og:image, twitter:image, metadataBase all
  resolve from NEXT_PUBLIC_SITE_URL with a https://ritgram.ereboslab.com
  default instead of the dead gitgram.app (NXDOMAIN).
- Page titles, OG copy, PWA manifest, offline.html, service-worker push
  notification title: Gitgram -> Ritgram. Left internal SW cache-name/tag
  strings (gitgram-static-, gitgram-sync, etc.) alone as low-risk code
  identifiers.
- /[owner]/page.tsx (top-level profile route) converted to an async Server
  Component that calls fetchProfile() + notFound() before any HTML streams,
  so a GET on any nonexistent username now returns a real 404 instead of a
  200 loading-shell (the same pattern [owner]/[name]/page.tsx already used
  one level down).
- apps/ritgram/backend: matching Gitgram->Ritgram string rename sweep across
  controllers/services/config comments and defaults (EMAIL_FROM,
  AITM_API_URL description, etc.) — no behavior change.
- apps/ritgram/mobile: matching user-visible string rename sweep.

tsc --noEmit clean on both web and backend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-17 03:20:08 +03:00

104 lines
2.4 KiB
TypeScript

import React from 'react';
import {
View,
Text,
StyleSheet,
ScrollView,
TouchableOpacity,
Share,
Alert,
} from 'react-native';
import { useLocalSearchParams, useRouter } from 'expo-router';
import { Colors } from '../../../constants/Colors';
import Header from '../../../components/navigation/Header';
import Icon from 'react-native-vector-icons/MaterialIcons';
export default function ShareReelScreen() {
const router = useRouter();
const { id } = useLocalSearchParams<{ id: string }>();
const shareOptions = [
{
id: 'native',
label: 'Share via...',
icon: 'share',
action: async () => {
try {
await Share.share({
message: `Check out this reel on Ritgram! https://ritgram.ereboslab.com/reel/${id}`,
});
} catch (error) {
Alert.alert('Error', 'Failed to share');
}
},
},
{
id: 'copy',
label: 'Copy Link',
icon: 'content-copy',
action: async () => {
Alert.alert('Success', 'Link copied to clipboard');
},
},
{
id: 'message',
label: 'Send in Message',
icon: 'message',
action: () => {
router.push(`/messages?shareReelId=${id}`);
},
},
{
id: 'story',
label: 'Add to Story',
icon: 'add-circle',
action: () => {
router.push(`/create-story?shareReelId=${id}`);
},
},
];
return (
<ScrollView style={styles.container}>
<Header title="Share Reel" />
<View style={styles.content}>
{shareOptions.map((option) => (
<TouchableOpacity
key={option.id}
style={styles.option}
onPress={option.action}
>
<Icon name={option.icon} size={24} color={Colors.accent} />
<Text style={styles.optionText}>{option.label}</Text>
<Icon name="chevron-right" size={24} color={Colors.textSecondary} />
</TouchableOpacity>
))}
</View>
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.background,
},
content: {
padding: 16,
},
option: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
backgroundColor: Colors.surface,
borderRadius: 8,
marginBottom: 12,
gap: 12,
},
optionText: {
flex: 1,
fontSize: 16,
color: Colors.text,
},
});