Skip to content

Commit 2fc8a23

Browse files
committed
Reset to current state
1 parent 7f3d6a1 commit 2fc8a23

17 files changed

+12365
-0
lines changed

a.eyes/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
*.orig.*
14+
*.jks
15+
*.p8
16+
*.p12
17+
*.key
18+
*.mobileprovision
19+
20+
# Metro
21+
.metro-health-check*
22+
23+
# debug
24+
npm-debug.*
25+
yarn-debug.*
26+
yarn-error.*
27+
28+
# macOS
29+
.DS_Store
30+
*.pem
31+
32+
# local env files
33+
.env*.local
34+
.env
35+
36+
# typescript
37+
*.tsbuildinfo

a.eyes/App.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React, { useState, useEffect } from 'react';
2+
import { View, StyleSheet, StatusBar, SafeAreaView } from 'react-native';
3+
import HomeScreen from './screens/HomeScreen';
4+
import CameraScreen from './screens/CameraScreen';
5+
import ChatScreen from './screens/ChatScreen';
6+
7+
export default function App() {
8+
const [screen, setScreen] = useState('Home');
9+
const [chatParams, setChatParams] = useState(null);
10+
11+
const navigate = (target, params = null) => {
12+
console.log(`Navigating to ${target}`, params);
13+
14+
// If going to Chat with params, update them
15+
if (target === 'Chat' && params) {
16+
setChatParams(params);
17+
}
18+
// If going to any other screen from Chat, reset params
19+
else if (screen === 'Chat' && target !== 'Chat') {
20+
setChatParams(null);
21+
}
22+
23+
setScreen(target);
24+
};
25+
26+
// Add important debugging
27+
useEffect(() => {
28+
console.log('Current screen:', screen);
29+
console.log('Chat params:', chatParams);
30+
}, [screen, chatParams]);
31+
32+
return (
33+
<SafeAreaView style={styles.container}>
34+
<StatusBar barStyle="dark-content" />
35+
{screen === 'Home' && <HomeScreen navigate={navigate} />}
36+
{screen === 'Camera' && <CameraScreen navigate={navigate} />}
37+
{screen === 'Chat' && <ChatScreen navigate={navigate} chatParams={chatParams} />}
38+
</SafeAreaView>
39+
);
40+
}
41+
42+
const styles = StyleSheet.create({
43+
container: {
44+
flex: 1,
45+
},
46+
});

a.eyes/app.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"expo": {
3+
"name": "A.Eyes",
4+
"slug": "a-eyes",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "light",
9+
"splash": {
10+
"image": "./assets/splash-icon.png",
11+
"resizeMode": "contain",
12+
"backgroundColor": "#ffffff"
13+
},
14+
"newArchEnabled": true,
15+
"assetBundlePatterns": [
16+
"**/*"
17+
],
18+
"ios": {
19+
"supportsTablet": true,
20+
"infoPlist": {
21+
"NSCameraUsageDescription": "A.Eyes needs access to your camera to capture images for analysis and description."
22+
},
23+
"newArchEnabled": true
24+
},
25+
"android": {
26+
"adaptiveIcon": {
27+
"foregroundImage": "./assets/adaptive-icon.png",
28+
"backgroundColor": "#ffffff"
29+
},
30+
"permissions": [
31+
"android.permission.CAMERA"
32+
],
33+
"newArchEnabled": true
34+
},
35+
"web": {
36+
"favicon": "./assets/favicon.png"
37+
},
38+
"plugins": [
39+
[
40+
"expo-camera",
41+
{
42+
"cameraPermission": "A.Eyes needs access to your camera to capture images for analysis and description."
43+
}
44+
]
45+
]
46+
}
47+
}

a.eyes/assets/adaptive-icon.png

17.1 KB
Loading

a.eyes/assets/favicon.png

1.43 KB
Loading

a.eyes/assets/icon.png

21.9 KB
Loading

a.eyes/assets/placeholder.png

206 KB
Loading

a.eyes/assets/splash-icon.png

17.1 KB
Loading

a.eyes/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

a.eyes/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { registerRootComponent } from 'expo';
2+
import App from './App';
3+
4+
// Register the main component
5+
registerRootComponent(App);

0 commit comments

Comments
 (0)