Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: qr code scanner #1

Merged
merged 15 commits into from
Nov 13, 2024
Merged
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
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ module.exports = {
extends: ['expo', 'prettier', 'eslint:recommended'],
plugins: ['prettier', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
env: {
node: true,
},
rules: {
// add project-specific linting rules here
'prettier/prettier': 'error',
Expand Down
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@
[//]: # "Add related PRs you're waiting on/ PRs that will conflict, etc; if this is a refactor, feel free to add PRs that previously modified this code"



CC: @christophertorres1 <!-- Include Carys if this PR involves frontend changes -->
47 changes: 30 additions & 17 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
import { StyleSheet, Text, View } from 'react-native';
import { StatusBar } from 'expo-status-bar';
import Logo from '@/components/Logo';
import * as React from 'react';
import { 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 TreeInfoPage from '@/screens/TreeInfo/TreeInfo';
import { RootStackParamList } from '@/types/navigation';

export default function App() {
const Stack = createNativeStackNavigator<RootStackParamList>();

function App() {
return (
<View style={styles.container}>
<Logo />
<Text>Open up App.tsx to start working on your app!</Text>
<StatusBar style="auto" />
</View>
<NavigationContainer>
<Stack.Navigator initialRouteName="Scanner">
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Scanner"
component={QRCodeScanner}
options={{ headerShown: false }}
/>
<Stack.Screen
name="TreeInfoPage"
component={TreeInfoPage}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
export default App;
8 changes: 8 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
"orientation": "portrait",
"icon": "./assets/bp-icon.png",
"userInterfaceStyle": "light",
"plugins": [
[
"expo-camera",
{
"cameraPermission": "Allow Our City Forest to access your camera to scan QR codes."
}
]
],
"splash": {
"image": "./assets/bp-splash.png",
"resizeMode": "contain",
Expand Down
Loading
Loading