Skip to content

Commit

Permalink
made minor changes to screens for UI check
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-Kiragu committed Oct 7, 2022
1 parent 162c705 commit e5dad20
Show file tree
Hide file tree
Showing 15 changed files with 6,765 additions and 6,255 deletions.
62 changes: 61 additions & 1 deletion App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { Image } from "react-native";
// AUTH
import SigninScreen from "./screens/auth/SigninScreen";
import SignupScreen from "./screens/auth/SignupScreen";
// import ForgotPasswordScreen from "./screens/auth/ForgotPassword";

import api from "./res/api";

// MAIN SCREENS
import CommentScreen from "./screens/mainScreens/CommentScreen";
Expand All @@ -16,12 +19,64 @@ import ProfileScreen from "./screens/mainScreens/ProfileScreen";
import ReportScreen from "./screens/mainScreens/ReportScreen";
import ScaleScreen from "./screens/mainScreens/ScaleScreen";
import NPSScale from "./screens/Scales/NPSscale";

// NAVIGATION
const AuthStack = createStackNavigator();
const Tab = createBottomTabNavigator();
const ScaleStack = createStackNavigator();
const ProfileStack = createStackNavigator();

// AXIOS API CALL -AUTHENTICATION

// function getCurrentUser() {
// console.log("getCurrentUser");
// // return
// api
// .get("api/profile/")
// .then((res) => {
// console.log("current", res);
// })
// .then((response) => {
// // return json;

// AsyncStorage.setItem("client", JSON.stringify(response.data));
// })
// .catch(function (error) {
// console.log(
// "There has been a problem with your fetch operation: " + error.message
// );
// // ADD THIS THROW error
// throw error;
// });
// }

// async function checkUserSignedIn() {
// // let context = this;
// try {
// let value = await AsyncStorage.getItem("user_token");
// // console.log("user_token ",value);
// if (value !== null) {
// // do something
// setIsSigned(true);
// getCurrentUser();
// } else {
// // do something else
// setIsSigned(false);
// }
// } catch (error) {
// // Error retrieving data
// console.log("checkUserSignedIn error", error);
// }
// }

// useEffect(() => {
// checkUserSignedIn();
// }, []);

{
/* {isSignedIn ? (
<> */
}

const ScaleStackScreen = () => (
<ScaleStack.Navigator>
<ScaleStack.Screen
Expand All @@ -46,6 +101,11 @@ const ProfileStackScreen = () => (
component={SignupScreen}
options={{ title: "DOWELL - SIGN UP" }}
/>
{/* <ProfileStack.Screen
name="ForgotPassword"
component={ForgotPassword}
options={{ title: "DOWELL - FORGOT PASSWORD" }}
/> */}
</ProfileStack.Navigator>
);

Expand Down
96 changes: 87 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@react-navigation/native-stack": "^6.8.0",
"@react-navigation/stack": "^6.3.1",
"@ui-kitten/components": "^5.1.2",
"axios": "^1.1.0",
"expo": "~46.0.9",
"expo-status-bar": "~1.4.0",
"react": "18.0.0",
Expand Down
7 changes: 7 additions & 0 deletions res/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import axios from "axios";

const api = axios.create({
baseURL: "https://100014.pythonanywhere.com/",
});

export default api;
10 changes: 5 additions & 5 deletions screens/Scales/NPSscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ export default function NPSScale() {
margin: 10,
padding: 10,
bottom: 0,
alignItems: "center",
alignSelf: "center",
justifyContent: "space-between",
}}
// Remove this to disable reaction icon and text
/>
<TextInput />
<Text
{/* <TextInput /> */}
{/* <Text
style={{
color: "red",
width: "100%",
Expand All @@ -76,9 +77,8 @@ export default function NPSScale() {
alignContent: "center",
marginTop: 10,
fontSize: 15,
marginBottom: 30,
}}
></Text>
></Text> */}
<NpsSettings />
<Text
style={{
Expand Down
Loading

0 comments on commit e5dad20

Please sign in to comment.