caelum0x f80b04ae0f feat(ritgram): move GitGram app into railyard as Ritgram, next to Rithub
Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram).
AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan.
Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 04:18:46 +03:00

113 lines
2.9 KiB
TypeScript

import { Tabs } from 'expo-router';
import { Colors } from '../../constants/Colors';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { emitSoftReset } from '../../utils/events';
import MinimalShellTabBar from '../../components/navigation/MinimalShellTabBar';
/**
* Fires a soft reset (scroll-to-top + refresh) when the user taps the tab that
* is already focused. React Navigation still navigates on a normal tab switch,
* so we gate on `navigation.isFocused()` to only react to a re-press.
*/
const softResetListeners = ({
navigation,
}: {
navigation: { isFocused: () => boolean };
}) => ({
tabPress: () => {
if (navigation.isFocused()) {
emitSoftReset();
}
},
});
export default function TabsLayout() {
return (
<Tabs
tabBar={(props) => <MinimalShellTabBar {...props} />}
screenOptions={{
headerShown: false,
tabBarActiveTintColor: Colors.primary,
tabBarInactiveTintColor: Colors.textSecondary,
tabBarStyle: {
backgroundColor: Colors.background,
borderTopColor: Colors.border,
borderTopWidth: 1,
height: 80,
paddingBottom: 8,
paddingTop: 8,
},
tabBarLabelStyle: {
fontSize: 12,
fontWeight: '500',
},
}}
>
<Tabs.Screen
name="home"
listeners={softResetListeners}
options={{
title: 'Home',
tabBarIcon: ({ color, size }) => (
<Icon name="home" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="create-post"
options={{
href: null, // Hide from tab bar
}}
/>
<Tabs.Screen
name="reels"
options={{
title: 'Reels',
tabBarIcon: ({ color, size }) => (
<Icon name="play-circle-outline" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
listeners={softResetListeners}
options={{
title: 'Explore',
tabBarIcon: ({ color, size }) => (
<Icon name="explore" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="messages"
options={{
title: 'Messages',
tabBarIcon: ({ color, size }) => (
<Icon name="message" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="notifications"
listeners={softResetListeners}
options={{
title: 'Notifications',
tabBarIcon: ({ color, size }) => (
<Icon name="notifications" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="profile"
options={{
title: 'Profile',
tabBarIcon: ({ color, size }) => (
<Icon name="account-circle" size={size || 24} color={color} />
),
}}
/>
</Tabs>
);
}