Skip to content

Commit

Permalink
Merge branch 'main' into katynguyen/ocf-19-lo-fi-tree-search-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
christophertorres1 authored Dec 11, 2024
2 parents 9c7facc + 06b8240 commit 1c6ab28
Show file tree
Hide file tree
Showing 95 changed files with 3,501 additions and 16,069 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-shadow': 'error',
},
ignorePatterns: ['src/supabase/functions/'],
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
},
},
};
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ yarn-error.*

# typescript
*.tsbuildinfo

# Supabase
src/supabase/.branches
src/supabase/.temp
src/supabase/.env
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.formatDocument": "explicit"
}
},
"deno.enable": true
}
77 changes: 29 additions & 48 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,34 @@
import * as React from 'react';
import { DefaultTheme, NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import QRCodeScanner from '@/components/QRCodeScanner/QRCodeScanner';
import HomeScreen from '@/screens/Home/Home';
import LoginScreen from '@/screens/login/LoginScreen';
import TreeInfoPage from '@/screens/TreeInfo/TreeInfo';
import TreeSearch from '@/screens/TreeSearch/TreeSearch';
import { LoginStackParamList, RootStackParamList } from '@/types/navigation';
import React from 'react';
import { Text } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useFonts } from 'expo-font';
import { DMSans_400Regular, DMSans_700Bold } from '@expo-google-fonts/dm-sans';
import { DefaultTheme } from '@react-navigation/native';
import { AuthContextProvider } from '@/context/AuthContext';
import AppNavigator from '@/navigation/AppNavigator';
import colors from '@/styles/colors';

const RootStack = createNativeStackNavigator<RootStackParamList>();
const LoginStack = createNativeStackNavigator<LoginStackParamList>();
DefaultTheme.colors.background = colors.white;

DefaultTheme.colors.background = '#FFFFFF';
export default function App() {
const [fontsLoaded] = useFonts({
DMSans_400Regular,
DMSans_700Bold,
});

const App = () => {
return (
<NavigationContainer theme={DefaultTheme}>
{/* <LoginStack.Navigator initialRouteName="Login">
<LoginStack.Screen
name="Login"
component={LoginScreen}
options={{ headerShown: false }}
/>
</LoginStack.Navigator> */}
if (!fontsLoaded) {
return null;
}

<RootStack.Navigator initialRouteName="TreeSearch">
<RootStack.Screen
name="Home"
component={HomeScreen}
options={{ headerShown: false }}
/>
<RootStack.Screen
name="Scanner"
component={QRCodeScanner}
options={{ headerShown: false }}
/>
<RootStack.Screen
name="TreeInfoPage"
component={TreeInfoPage}
options={{ headerShown: false }}
/>
<RootStack.Screen
name="TreeSearch"
component={TreeSearch}
options={{ headerShown: false }}
/>
</RootStack.Navigator>
</NavigationContainer>
);
};
const defaultFontFamily = 'DMSans_400Regular';
(Text as any).defaultProps = (Text as any).defaultProps || {};
(Text as any).defaultProps.style = { fontFamily: defaultFontFamily };

export default App;
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<AuthContextProvider>
<AppNavigator />
</AuthContextProvider>
</GestureHandlerRootView>
);
}
19 changes: 9 additions & 10 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"expo": {
"name": "Our City Forest",
"slug": "our-city-forest",
"newArchEnabled": true,
"owner": "ocfdev",
"version": "1.0.0",
"orientation": "portrait",
Expand All @@ -14,21 +15,19 @@
{
"cameraPermission": "Allow Our City Forest to access your camera to scan QR codes."
}
]
],
"splash": {
"image": "./assets/bp-splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"plugins": [
],
[
"expo-dev-launcher",
{
"launchMode": "most-recent"
}
]
],
"splash": {
"image": "./assets/bp-splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"platforms": ["ios", "android", "web"],
"ios": {
"bundleIdentifier": "org.calblueprint.ourcityforest",
Expand All @@ -48,11 +47,11 @@
"web": {
"favicon": "./assets/bp-favicon.png"
},
"scheme": "org.calblueprint.ourcityforest",
"extra": {
"eas": {
"projectId": "d04f2944-f495-4c9b-b330-6e13ce59c6ff"
}
}
},
"scheme": "our-city-forest"
}
}
Binary file added assets/ocf_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tree-info-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { registerRootComponent } from 'expo';
import App from './App';

registerRootComponent(App);
Loading

0 comments on commit 1c6ab28

Please sign in to comment.