Skip to content

Commit

Permalink
trying aws setup
Browse files Browse the repository at this point in the history
  • Loading branch information
avichaljadeja2002 committed Oct 14, 2024
2 parents a89c2e9 + 81e2a10 commit f6e17a8
Show file tree
Hide file tree
Showing 56 changed files with 2,595 additions and 29,013 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/CITests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI Tests

on:
push:
branches:
- main

jobs:
starting-tests:
runs-on: ubuntu-latest
steps:
- name: Starting Tests
run: pwd

lint-ts:
runs-on: ubuntu-latest
needs: starting-tests
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run TypeScript Lint
run: npx eslint

type-check:
runs-on: ubuntu-latest
needs: starting-tests
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run Type Check
run: npx tsc

expo-doctor:
runs-on: ubuntu-latest
needs: starting-tests
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run Expo Doctor
run: npx expo-doctor@latest
13 changes: 0 additions & 13 deletions .github/workflows/expo-doctor.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/list-ts.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/type-check.yml

This file was deleted.

2 changes: 1 addition & 1 deletion app/+html.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ScrollViewStyleReset } from 'expo-router/html';
import { type PropsWithChildren } from 'react';

import React from 'react';
/**
* This file is web-only and used to configure the root HTML for every web page during static rendering.
* The contents of this function only run in Node.js environments and do not have access to the DOM or browser APIs.
Expand Down
15 changes: 7 additions & 8 deletions app/+not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { Link, Stack } from 'expo-router';
import { StyleSheet } from 'react-native';
import React from 'react';

import { ThemedText } from '@/components/ThemedText';
import { ThemedView } from '@/components/ThemedView';
import { Link, Stack } from 'expo-router';
import { StyleSheet, View, Text } from 'react-native';

export default function NotFoundScreen() {
return (
<>
<Stack.Screen options={{ title: 'Oops!' }} />
<ThemedView style={styles.container}>
<ThemedText type="title">This screen doesn't exist.</ThemedText>
<View style={styles.container}>
<Text>This screen doesn&apos;t exist.</Text>
<Link href="/" style={styles.link}>
<ThemedText type="link">Go to home screen!</ThemedText>
<Text>Go to home screen!</Text>
</Link>
</ThemedView>
</View>
</>
);
}
Expand Down
31 changes: 16 additions & 15 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { View, TouchableOpacity, StyleSheet } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { Ionicons } from "@expo/vector-icons";
import App from './index';
import HealthTracker from './healthTracker';
Expand All @@ -12,6 +11,7 @@ import { RootStackParamList } from '@/components/Types';
import AddCalendarEvents from './addCalendarEvents';
import AddHealthEvents from './addHealthEvents';
import AddMeals from './addMeals';
import AddFinanceEvents from './addFinanceEvents';


const Stack = createStackNavigator<RootStackParamList>();
Expand Down Expand Up @@ -40,20 +40,21 @@ const CustomTopBar = ({ navigation }: StackHeaderProps) => {

export default function Layout() {
return (
<Stack.Navigator
screenOptions={{
header: (props) => <CustomTopBar {...props} />,
}}
>
<Stack.Screen name="index" component={App} />
<Stack.Screen name="healthTracker" component={HealthTracker} />
<Stack.Screen name="mealTracker" component={MealTracking} />
<Stack.Screen name="finance" component={Finance} />
<Stack.Screen name="calendarEvents" component={CalendarEvents} />
<Stack.Screen name="addCalendarEvents" component={AddCalendarEvents} />
<Stack.Screen name="addHealthEvents" component={AddHealthEvents} />
<Stack.Screen name="addMeals" component={AddMeals} />
</Stack.Navigator>
<Stack.Navigator
screenOptions={{
header: (props) => <CustomTopBar {...props} />,
}}
>
<Stack.Screen name="index" component={App} />
<Stack.Screen name="healthTracker" component={HealthTracker} />
<Stack.Screen name="mealTracker" component={MealTracking} />
<Stack.Screen name="finance" component={Finance} />
<Stack.Screen name="addFinanceEvents" component={AddFinanceEvents} />
<Stack.Screen name="calendarEvents" component={CalendarEvents} />
<Stack.Screen name="addCalendarEvents" component={AddCalendarEvents} />
<Stack.Screen name="addHealthEvents" component={AddHealthEvents} />
<Stack.Screen name="addMeals" component={AddMeals} />
</Stack.Navigator>
);
}

Expand Down
38 changes: 7 additions & 31 deletions app/addCalendarEvents.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { View, Text, TouchableOpacity, Platform, TextInput } from 'react-native';
import { View, Text, TouchableOpacity, TextInput } from 'react-native';
import { styles } from './styles';
import { Ionicons } from "@expo/vector-icons";
import { Dropdown } from 'react-native-element-dropdown';
Expand All @@ -19,12 +19,9 @@ const data = [

export default function AddCalendarEvents() {
type AddCalendarTrackerNavigationProp = StackNavigationProp<RootStackParamList, 'addCalendarEvents'>;
const navigation = useNavigation<AddCalendarTrackerNavigationProp>();
const navigation = useNavigation<AddCalendarTrackerNavigationProp>();

const [value, setValue] = useState<string | null>(null);
const [isFocus, setIsFocus] = useState(false);
const [datePickerVisible, setDatePickerVisible] = useState(false);
const [timePickerVisible, setTimePickerVisible] = useState(false);

const [eventData, setEventData] = useState({
user_id: 1,
Expand All @@ -44,7 +41,7 @@ export default function AddCalendarEvents() {
const handleSave = async () => {
const formattedData = {
...eventData,
event_date: eventData.event_date.toISOString().split('T')[0],
event_date: eventData.event_date.toISOString().split('T')[0],
event_time: eventData.event_time.toTimeString().split(' ')[0],
};

Expand All @@ -57,23 +54,13 @@ export default function AddCalendarEvents() {
navigation.navigate('calendarEvents')
};

const showDatePicker = () => {
setDatePickerVisible(true);
};

const showTimePicker = () => {
setTimePickerVisible(true);
};

const handleDateChange = (event: any, selectedDate: any) => {
setDatePickerVisible(Platform.OS === 'ios');
if (selectedDate) {
handleChange('event_date', selectedDate);
}
};

const handleTimeChange = (event: any, selectedTime: any) => {
setTimePickerVisible(Platform.OS === 'ios');
if (selectedTime) {
handleChange('event_time', selectedTime);
}
Expand Down Expand Up @@ -105,34 +92,24 @@ export default function AddCalendarEvents() {

<View style={styles.inLine}>
<Text style={styles.inputText}>Date</Text>
<TouchableOpacity onPress={showDatePicker} style={styles.input}>
<Text>{eventData.event_date.toDateString()}</Text>
</TouchableOpacity>
{datePickerVisible && (
<View style={styles.dateTime}>
<DateTimePicker
value={eventData.event_date}
mode="date"
display="default"
onChange={handleDateChange}
/>
)}
</View>

<View style={styles.inLine}>
<Text style={styles.inputText}>Time</Text>
<TouchableOpacity onPress={showTimePicker} style={styles.input}>
<Text>{eventData.event_time.toTimeString().split(' ')[0]}</Text>
</TouchableOpacity>
{timePickerVisible && (
<DateTimePicker
value={eventData.event_time}
mode="time"
display="default"
onChange={handleTimeChange}
/>
)}
</View>
</View>


<View style={styles.inLine}>
<Text style={styles.inputText}>Repeating</Text>
<View style={styles.container}>
Expand All @@ -145,7 +122,6 @@ export default function AddCalendarEvents() {
value={value}
onChange={item => {
setValue(item.value);
setIsFocus(false);
handleChange('repeat_timeline', item.label);
}}
renderLeftIcon={() => (
Expand All @@ -160,7 +136,7 @@ export default function AddCalendarEvents() {
</View>

<View style={styles.inLine}>
<Text style={[styles.inputText, {alignSelf:'baseline', top:5}]}>Description</Text>
<Text style={[styles.inputText, { alignSelf: 'baseline', top: 5 }]}>Description</Text>
<TextInput
style={styles.bigInput}
value={eventData.description}
Expand Down
Loading

0 comments on commit f6e17a8

Please sign in to comment.