-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc787ed
commit 6b3e40d
Showing
1,605 changed files
with
342,944 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "macos-clang-arm64", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"compilerPath": "/usr/bin/clang", | ||
"cStandard": "${default}", | ||
"cppStandard": "c++11", | ||
"intelliSenseMode": "macos-clang-arm64", | ||
"compilerArgs": [ | ||
"" | ||
] | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "C/C++ Runner: Debug Session", | ||
"type": "lldb", | ||
"request": "launch", | ||
"args": [], | ||
"cwd": "/Users/vunguyen/CPPTest/350Project", | ||
"program": "/Users/vunguyen/CPPTest/350Project/build/Debug/outDebug" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"C_Cpp_Runner.cCompilerPath": "clang", | ||
"C_Cpp_Runner.cppCompilerPath": "clang++", | ||
"C_Cpp_Runner.debuggerPath": "lldb", | ||
"C_Cpp_Runner.cStandard": "", | ||
"C_Cpp_Runner.cppStandard": "c++11", | ||
"C_Cpp_Runner.msvcBatchPath": "", | ||
"C_Cpp_Runner.useMsvc": false, | ||
"C_Cpp_Runner.warnings": [ | ||
"-Wall", | ||
"-Wextra", | ||
"-Wpedantic", | ||
"-Wshadow", | ||
"-Wformat=2", | ||
"-Wcast-align", | ||
"-Wconversion", | ||
"-Wsign-conversion", | ||
"-Wnull-dereference" | ||
], | ||
"C_Cpp_Runner.msvcWarnings": [ | ||
"/W4", | ||
"/permissive-", | ||
"/w14242", | ||
"/w14287", | ||
"/w14296", | ||
"/w14311", | ||
"/w14826", | ||
"/w44062", | ||
"/w44242", | ||
"/w14905", | ||
"/w14906", | ||
"/w14263", | ||
"/w44265", | ||
"/w14928" | ||
], | ||
"C_Cpp_Runner.enableWarnings": true, | ||
"C_Cpp_Runner.warningsAsError": false, | ||
"C_Cpp_Runner.compilerArgs": [], | ||
"C_Cpp_Runner.linkerArgs": [], | ||
"C_Cpp_Runner.includePaths": [], | ||
"C_Cpp_Runner.includeSearch": [ | ||
"*", | ||
"**/*" | ||
], | ||
"C_Cpp_Runner.excludeSearch": [ | ||
"**/build", | ||
"**/build/**", | ||
"**/.*", | ||
"**/.*/**", | ||
"**/.vscode", | ||
"**/.vscode/**" | ||
], | ||
"C_Cpp_Runner.useAddressSanitizer": false, | ||
"C_Cpp_Runner.useUndefinedSanitizer": false, | ||
"C_Cpp_Runner.useLeakSanitizer": false, | ||
"C_Cpp_Runner.showCompilationTime": false, | ||
"C_Cpp_Runner.useLinkTimeOptimization": false, | ||
"C_Cpp_Runner.msvcSecureNoWarnings": false, | ||
"files.associations": { | ||
"iosfwd": "cpp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import axios from "axios"; | ||
|
||
const BASE_URL = "http://10.0.2.2:3000"; // Replace with your server's address and port | ||
|
||
export const loginUser = async (username, password) => { | ||
try { | ||
const response = await axios.post(`${BASE_URL}/login`, { | ||
username, | ||
password, | ||
}); | ||
console.log(response.data); | ||
return response; | ||
} catch (error) { | ||
// Handle errors here | ||
console.error(error); | ||
} | ||
}; | ||
|
||
export const registerUser = async ( | ||
username, | ||
password, | ||
email, | ||
name, | ||
phone_number, | ||
date_of_birth | ||
) => { | ||
try { | ||
let response = await fetch(`${BASE_URL}/register`, { | ||
// Use BASE_URL here | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
username: username, | ||
password: password, | ||
email: email, | ||
name: name, | ||
phone_number: phone_number, | ||
date_of_birth: date_of_birth, | ||
}), | ||
}); | ||
let json = await response.json(); | ||
return { status: response.status, data: json }; | ||
} catch (error) { | ||
console.error("Something wrong",error); | ||
throw error; // Re-throw the error for handling in the calling function | ||
} | ||
}; | ||
|
||
export const updateBiometrics = async ( | ||
username, | ||
height, | ||
weight, | ||
fitnessLevel, | ||
fitnessGoal | ||
) => { | ||
try { | ||
const response = await axios.post(`${BASE_URL}/updateBiometrics`, { | ||
username, | ||
height, | ||
weight, | ||
fitnessLevel, | ||
fitnessGoal, | ||
}); | ||
return response; | ||
} catch (error) { | ||
console.error(error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,8 @@ | ||
import { StatusBar } from "expo-status-bar"; | ||
import * as React from "react"; | ||
import { StyleSheet, View, Text, TouchableOpacity } from "react-native"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | ||
import { MaterialCommunityIcons } from "react-native-vector-icons"; | ||
import { useState, useEffect } from "react"; | ||
// App.js | ||
import React from "react"; | ||
import MainNavigator from "./navigators/MainNavigator"; | ||
|
||
import CalendarComponent from "./CalendarComponent.js"; | ||
import DayScreen from "./DayScreen.js"; | ||
import WorkoutScreen from "./WorkoutScreen"; | ||
import CookbookScreen from "./CookbookScreen"; | ||
import AddScreen from "./AddScreen.js"; | ||
import SettingsScreen from "./SettingsScreen.js"; | ||
|
||
const Tab = createBottomTabNavigator(); | ||
const Stack = createStackNavigator(); | ||
|
||
const TabNavigator = () => { | ||
const [savedWorkouts, setSavedWorkouts] = useState([]); | ||
const [savedMeals, setSavedMeals] = useState([]); | ||
useEffect(() => {}, [savedWorkouts]); | ||
useEffect(() => {}, [savedMeals]); | ||
return ( | ||
<Tab.Navigator> | ||
<Tab.Screen | ||
name="Calendar" | ||
component={CalendarStack} | ||
options={{ | ||
tabBarIcon: ({ color, size }) => ( | ||
<MaterialCommunityIcons name="calendar" color={color} size={size} /> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Create" | ||
component={() => ( | ||
<AddScreen | ||
savedWorkouts={savedWorkouts} | ||
setSavedWorkouts={setSavedWorkouts} | ||
savedMeals={savedMeals} | ||
setSavedMeals={setSavedMeals} | ||
/> | ||
)} | ||
options={{ | ||
tabBarLabel: "Create", | ||
tabBarIcon: ({ color, size }) => ( | ||
<MaterialCommunityIcons name="plus" color={color} size={size} /> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Your Workouts" | ||
component={() => ( | ||
<WorkoutScreen | ||
savedWorkouts={savedWorkouts} | ||
setSavedWorkouts={setSavedWorkouts} | ||
/> | ||
)} | ||
options={{ | ||
tabBarLabel: "Workout", | ||
tabBarIcon: ({ color, size }) => ( | ||
<MaterialCommunityIcons name="dumbbell" color={color} size={size} /> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Your Cookbook" | ||
component={() => ( | ||
<CookbookScreen | ||
savedMeals={savedMeals} | ||
setSavedMeals={setSavedMeals} | ||
/> | ||
)} | ||
options={{ | ||
tabBarLabel: "Cookbook", | ||
tabBarIcon: ({ color, size }) => ( | ||
<MaterialCommunityIcons | ||
name="food-fork-drink" | ||
color={color} | ||
size={size} | ||
/> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Settings" | ||
component={SettingsScreen} | ||
options={{ | ||
tabBarLabel: "Settings", | ||
tabBarIcon: ({ color, size }) => ( | ||
<MaterialCommunityIcons name="cog" color={color} size={size} /> | ||
), | ||
}} | ||
/> | ||
</Tab.Navigator> | ||
); | ||
}; | ||
|
||
const CalendarStack = () => { | ||
return ( | ||
<Stack.Navigator initialRouteName=" "> | ||
<Stack.Screen name=" " component={CalendarComponent} /> | ||
<Stack.Screen name="DayScreen" component={DayScreen} /> | ||
</Stack.Navigator> | ||
); | ||
}; | ||
|
||
export default function App() { | ||
return ( | ||
<NavigationContainer> | ||
<TabNavigator /> | ||
</NavigationContainer> | ||
); | ||
function App() { | ||
return <MainNavigator />; | ||
} | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import React from "react"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
|
||
import LoginScreen from "../screens/LoginScreen"; | ||
import SignUpScreen from "../screens/SignUpScreen"; | ||
import ForgotPassword from "../screens/ForgotPassword"; | ||
import BioMetricScreen from "../screens/BioMetricScreen"; | ||
import ConfirmationScreen from "../screens/SignUpConfirm"; | ||
import CodeVerification from "../screens/CodeVerification"; | ||
import NewPassword from "../screens/NewPassword"; | ||
import NewPassConfirm from "../screens/NewPassConfirm"; | ||
import TabNavigator from "./TabNavigator"; // Import your TabNavigator | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
function MainNavigator() { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Login"> | ||
<Stack.Screen | ||
name="Login" | ||
component={LoginScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="SignUp" | ||
component={SignUpScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Biometric" | ||
component={BioMetricScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Confirmation" | ||
component={ConfirmationScreen} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="ForgotPassword" | ||
component={ForgotPassword} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Verification" | ||
component={CodeVerification} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="NewPassword" | ||
component={NewPassword} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="NewPassConfirm" | ||
component={NewPassConfirm} | ||
options={{ headerShown: false }} | ||
/> | ||
<Stack.Screen | ||
name="Home" | ||
component={TabNavigator} // This is your Tab Navigator | ||
options={{ headerShown: false }} | ||
/> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
|
||
export default MainNavigator; |
Oops, something went wrong.