Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Tabs } from 'expo-router';
import { useColorScheme } from 'react-native';
import { TabBarIcon } from '../../components/navigation/TabBarIcon';

export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
screenOptions={{
tabBarActiveTintColor: '#007AFF',
}}>
<Tabs.Screen
name="index"
options={{
title: 'Home',
tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,
}}
/>
</Tabs>
);
}
4 changes: 3 additions & 1 deletion app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'react-native-get-random-values';
import React, { useState } from 'react';
import { View, Text, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import Parse from 'parse/react-native';
//import Parse from 'parse/react-native';
import Parse from 'parse/react-native.js';

import AsyncStorage from '@react-native-async-storage/async-storage';

// Initialize Parse only once
Expand Down
13 changes: 13 additions & 0 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Stack } from 'expo-router';
import { useEffect } from 'react';
import { useColorScheme } from 'react-native';

export default function RootLayout() {
const colorScheme = useColorScheme();

return (
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
</Stack>
);
}
5 changes: 5 additions & 0 deletions app/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Redirect } from 'expo-router';

export default function Index() {
return <Redirect href="/(tabs)" />;
}
18 changes: 18 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const exclusionList = require('metro-config/src/defaults/exclusionList');

const config = getDefaultConfig(__dirname);

// ❌ Completely block Metro from loading 'ws' package
config.resolver.blockList = exclusionList([
/node_modules\/ws\/.*/
]);

// If you still need to shim 'ws' for RN code that tries to import it
config.resolver.extraNodeModules = {
...config.resolver.extraNodeModules,
ws: require.resolve('./wsEmptyShim.js'),
};

module.exports = config;
2 changes: 2 additions & 0 deletions wsEmptyShim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// wsEmptyShim.js
module.exports = {};