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

123 lines
3.1 KiB
TypeScript

import React from 'react';
import {
View,
Text,
StyleSheet,
ScrollView,
TouchableOpacity,
Linking,
} from 'react-native';
import { 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 HelpCenterScreen() {
const router = useRouter();
const helpCategories = [
{
title: 'Getting Started',
items: [
{ label: 'How to create an account', route: '/help/account' },
{ label: 'How to post content', route: '/help/posting' },
{ label: 'How to follow users', route: '/help/following' },
],
},
{
title: 'Features',
items: [
{ label: 'Posts and Reels', route: '/help/posts-reels' },
{ label: 'Stories', route: '/help/stories' },
{ label: 'Messages', route: '/help/messages' },
{ label: 'GitHub Projects', route: '/help/projects' },
],
},
{
title: 'Account & Privacy',
items: [
{ label: 'Privacy settings', route: '/help/privacy' },
{ label: 'Account security', route: '/help/security' },
{ label: 'Report a problem', route: '/profile/settings/report' },
],
},
{
title: 'Support',
items: [
{ label: 'Contact Support', action: 'contact' },
{ label: 'FAQ', route: '/help/faq' },
{ label: 'Community Guidelines', route: '/help/guidelines' },
],
},
];
const handleContactSupport = () => {
Linking.openURL('mailto:support@ritgram.ereboslab.com?subject=Support Request');
};
const renderCategory = (category: any) => (
<View key={category.title} style={styles.category}>
<Text style={styles.categoryTitle}>{category.title}</Text>
{category.items.map((item: any) => (
<TouchableOpacity
key={item.label}
style={styles.helpItem}
onPress={() => {
if (item.action === 'contact') {
handleContactSupport();
} else if (item.route) {
router.push(item.route as any);
}
}}
>
<Text style={styles.helpItemLabel}>{item.label}</Text>
<Icon name="chevron-right" size={24} color={Colors.textSecondary} />
</TouchableOpacity>
))}
</View>
);
return (
<View style={styles.container}>
<Header title="Help Center" />
<ScrollView style={styles.content}>
{helpCategories.map(renderCategory)}
</ScrollView>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.background,
},
content: {
flex: 1,
padding: 16,
},
category: {
marginBottom: 32,
},
categoryTitle: {
fontSize: 18,
fontWeight: '600',
color: Colors.text,
marginBottom: 12,
},
helpItem: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
padding: 16,
backgroundColor: Colors.surface,
borderRadius: 8,
marginBottom: 8,
},
helpItemLabel: {
fontSize: 16,
color: Colors.text,
},
});