Skip to content

Commit 04776ab

Browse files
my last commit
1 parent 0c00c9b commit 04776ab

File tree

7 files changed

+122
-15
lines changed

7 files changed

+122
-15
lines changed

.github/workflows/eas-build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Deploy App
2+
3+
on:
4+
push:
5+
branches:
6+
- main # This workflow runs when you push to the 'main' branch
7+
8+
jobs:
9+
build:
10+
name: EAS Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
21+
- name: Set up Expo and EAS
22+
uses: expo/expo-github-action@v8
23+
with:
24+
eas-version: latest
25+
token: ${{ secrets.EXPO_TOKEN }}
26+
27+
- name: Install dependencies
28+
run: npm install
29+
30+
- name: Start build
31+
run: eas build --platform android --profile production --non-interactive

app.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"slug": "To_Do_App",
55
"version": "1.0.0",
66
"orientation": "portrait",
7-
"icon": "./assets/images/icon.png",
7+
"icon": "./src/assets/images/icon.png",
88
"scheme": "todoapp",
99
"userInterfaceStyle": "automatic",
1010
"newArchEnabled": true,
@@ -13,22 +13,23 @@
1313
},
1414
"android": {
1515
"adaptiveIcon": {
16-
"foregroundImage": "./assets/images/adaptive-icon.png",
16+
"foregroundImage": "./src/assets/images/adaptive-icon.png",
1717
"backgroundColor": "#ffffff"
1818
},
19-
"edgeToEdgeEnabled": true
19+
"edgeToEdgeEnabled": true,
20+
"package": "com.adarsh_30.To_Do_App"
2021
},
2122
"web": {
2223
"bundler": "metro",
2324
"output": "static",
24-
"favicon": "./assets/images/favicon.png"
25+
"favicon": "./src/assets/images/favicon.png"
2526
},
2627
"plugins": [
2728
"expo-router",
2829
[
2930
"expo-splash-screen",
3031
{
31-
"image": "./assets/images/splash-icon.png",
32+
"image": "./src/assets/images/splash-icon.png",
3233
"imageWidth": 200,
3334
"resizeMode": "contain",
3435
"backgroundColor": "#ffffff"
@@ -37,6 +38,12 @@
3738
],
3839
"experiments": {
3940
"typedRoutes": true
41+
},
42+
"extra": {
43+
"router": {},
44+
"eas": {
45+
"projectId": "273b0dee-0e1a-4e36-89de-45ac64d00a9d"
46+
}
4047
}
4148
}
4249
}

eas.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"cli": {
3+
"version": ">= 16.16.0",
4+
"appVersionSource": "remote"
5+
},
6+
"build": {
7+
"development": {
8+
"developmentClient": true,
9+
"distribution": "internal"
10+
},
11+
"preview": {
12+
"android": {
13+
"buildType": "apk"
14+
},
15+
"distribution": "internal"
16+
},
17+
"production": {
18+
"autoIncrement": true
19+
}
20+
},
21+
"submit": {
22+
"production": {}
23+
}
24+
}

src/app/(tabs)/AddTask.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const AddTaskScreen = () => {
6666

6767
};
6868
return (
69-
<ScrollView>
69+
<ScrollView contentContainerStyle={{ flexGrow: 1, padding: 16, backgroundColor: "#F4EBD3" }}>
7070
<Snackbar
7171
visible={snackbarVisible}
7272
onDismiss={() => setSnackbarVisible(false)}

src/app/Index.tsx

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,55 @@
1-
import { useEffect } from 'react';
1+
// SignupSigninScreen.tsx
2+
import { StyleSheet, Text, View, TouchableOpacity } from 'react-native';
3+
import React from 'react';
24
import { router } from 'expo-router';
35

4-
export default function Index() {
5-
useEffect(() => {
6-
router.replace('/Login'); // 👈 instantly redirects to login
7-
}, []);
6+
const Index = () => {
7+
return (
8+
<View style={styles.container}>
9+
<Text style={styles.title}>Welcome</Text>
810

9-
return null; // no UI
10-
}
11+
<TouchableOpacity style={styles.button} onPress={() => router.push('/(auth)/SignUp')}>
12+
<Text style={styles.buttonText}>Sign Up</Text>
13+
</TouchableOpacity>
14+
15+
<TouchableOpacity style={[styles.button, styles.signInButton]} onPress={() => router.push('/(auth)/Login')}>
16+
<Text style={styles.buttonText}>Sign In</Text>
17+
</TouchableOpacity>
18+
</View>
19+
);
20+
};
21+
22+
export default Index;
23+
24+
const styles = StyleSheet.create({
25+
container: {
26+
flex: 1,
27+
justifyContent: 'center',
28+
alignItems: 'center',
29+
backgroundColor: '#f2f2f2',
30+
paddingHorizontal: 20,
31+
},
32+
title: {
33+
fontSize: 32,
34+
fontWeight: 'bold',
35+
marginBottom: 40,
36+
color: '#333',
37+
},
38+
button: {
39+
backgroundColor: '#4a90e2',
40+
paddingVertical: 15,
41+
paddingHorizontal: 60,
42+
borderRadius: 10,
43+
marginBottom: 20,
44+
width: '100%',
45+
alignItems: 'center',
46+
},
47+
signInButton: {
48+
backgroundColor: '#50e3c2',
49+
},
50+
buttonText: {
51+
color: '#fff',
52+
fontSize: 18,
53+
fontWeight: '600',
54+
},
55+
});

src/app/_layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import { AuthProvider, useAuth } from "@/context/AuthContext";
1717
const AuthGate = () => {
1818
const { user } = useAuth();
1919
return (
20-
<Stack>
20+
<Stack screenOptions={{ headerShown: false }}>
2121
{user ? (
22-
<Stack.Screen name="(tabs)/Home" />
22+
<Stack.Screen name="(tabs)/Home" />
2323
) : (
2424
<Stack.Screen name="(auth)/Login" />
2525
)}

src/assets/images/icon.png

40.8 KB
Loading

0 commit comments

Comments
 (0)