Skip to content

Commit

Permalink
Kikin merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinFrazier committed Dec 5, 2019
2 parents d9417b9 + ae92569 commit 590c38f
Show file tree
Hide file tree
Showing 37 changed files with 2,232 additions and 83 deletions.
11 changes: 1 addition & 10 deletions .expo/packager-info.json
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{
"devToolsPort": 19002,
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 4686,
"expoServerNgrokUrl": "https://8x-79y.anonymous.final-project-4-locos-1.exp.direct",
"packagerNgrokUrl": "https://packager.8x-79y.anonymous.final-project-4-locos-1.exp.direct",
"ngrokPid": 4740,
"webpackServerPort": null
}
{}
4 changes: 2 additions & 2 deletions .expo/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hostType": "lan",
"lanType": "ip",
"dev": true,
"minify": false,
"dev": false,
"minify": true,
"urlRandomness": "8x-79y",
"https": false
}
31 changes: 29 additions & 2 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Component} from 'react';
import React, {useState} from 'react';
import {StyleSheet, Text, View,} from 'react-native';
import {credentials} from './src/config';
import AuthenticationMenu from './src/Navigation/navigation';
Expand All @@ -16,19 +16,46 @@ console.warn = message => {
_console.warn(message);
}
};
import UserWorkspaceReducer from './src/authentication/store/Reducer/workspace'

import * as Font from 'expo-font';
import { useScreens } from 'react-native-screens'
import { AppLoading } from 'expo';

useScreens()

console.ignoredYellowBox = ['Setting a timer']

const fetchFonts = () => {
return Font.loadAsync({
'open-sans': require('./assets/fonts/OpenSans-Regular.ttf'),
'open-sans-bold': require('./assets/fonts/OpenSans-Bold.ttf')
});
};

credentials();

const rootReducer = combineReducers({
userAuth: UserAuthenticationReducer
userAuth: UserAuthenticationReducer,
WorkSpaces: UserWorkspaceReducer
});

const store = createStore(rootReducer, applyMiddleware(ReduxThunk));


export default function App(){
const [fontLoaded, setFontLoaded] = useState(false);

if(!fontLoaded){
return (
<AppLoading
startAsync={fetchFonts}
onFinish={() => setFontLoaded(true)}
onError = {console.warn}
/>
)
}

return (
<Provider store={store}>
<AuthenticationMenu/>
Expand Down
Binary file added assets/fonts/OpenSans-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/OpenSans-Regular.ttf
Binary file not shown.
46 changes: 43 additions & 3 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,27 @@
},
"dependencies": {
"expo": "^35.0.0",
"expo-file-system": "~7.0.0",
"expo-font": "^7.0.0",
"expo-image-picker": "~7.0.0",
"expo-location": "~7.0.0",
"expo-permissions": "~7.0.0",
"expo-task-manager": "~7.0.0",
"firebase": "^7.2.1",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-email": "^1.0.2",
"react-native-chart-kit": "^4.1.0",
"react-native-gesture-handler": "~1.3.0",
"react-native-maps": "~0.25.0",
"react-native-reanimated": "^1.4.0",
"react-native-screens": "^2.0.0-alpha.12",
"react-native-svg": "^9.13.3",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-header-buttons": "^3.0.4",
"react-navigation-stack": "^1.10.2",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
Expand Down
111 changes: 85 additions & 26 deletions src/Navigation/navigation.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
import React from 'react'
import {createAppContainer, createSwitchNavigator} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack'
import { SafeAreaView, Button, View } from 'react-native';
import { createDrawerNavigator , DrawerNavigatorItems} from 'react-navigation-drawer';

import { Button, Platform, View, SafeAreaView } from 'react-native';
import * as authActions from '../authentication/store/Action/auth'
import { useDispatch } from 'react-redux';

import Colors from '../constants/Colors'


import AuthenticationMenu from '../authentication/AuthenticationMenu'
import SignUp from '../authentication/User/SignUpScreen'
import Login from '../authentication/User/LoginScreen'

import MainScreen from '../components/MainScreen'
import Title from '../components/Title'
import Feed from '../components/Feed'
import Menu from '../components/Main'
import myMap from '../components/myMap'
import UserInfo from '../components/UserInfo'
import CreateWorkspace from '../components/CreateWorkspace'
import { createDrawerNavigator } from 'react-navigation-drawer';
// import DrawerNavigation from '../Navigation/DrawerNavigation'
import Dashboard from '../components/dashboardComponents/Dashboard'

const Features = createStackNavigator(

import AuthWorkspacesScreen from '../Screens/WorkSpace/user/AuthWorkspacesScreen2v'
import AuthEditWorkspaceScreen from '../Screens/WorkSpace/user/AuthEdithWorkspaceScreen'
import AuthListWorkspaceMemberScreen from '../Screens/WorkSpace/user/AuthListWorkspaceMembersScreen'
import AuthMap from '../components/AuthMap'

import UserWorkspacesScreen from '../Screens/WorkSpace/Member/UserWorkspacesScreen'
import UserJoinWorkspacesScreen from '../Screens/WorkSpace/Member/UserJoinWorkspacesScreen'
import UserWorkspaceMap from '../components/WorkSpaceMap'



const AuthWorkSpacesNavigator = createStackNavigator(
{


Expand All @@ -33,57 +46,103 @@ const Features = createStackNavigator(
UserInfoRoute: UserInfo,
FeedRoute: Feed,
CreateWorkspaceRoute: CreateWorkspace,
DashboardRoute: Dashboard
},{
defaultNavigationOptions: ({ navigation }) => ({
headerRight: (
<Button
title="Logout"
onPress={() => navigation.navigate('Auth')}
/>
)
}

)
DashboardRoute: Dashboard,
AuthWorkspacesScreen: AuthWorkspacesScreen,
AuthEditWorkspaceScreen :AuthEditWorkspaceScreen,
AuthMap:AuthMap,
UserWorkspaceMap:UserWorkspaceMap,
AuthListWorkspaceMemberScreen: AuthListWorkspaceMemberScreen
}, {
defaultNavigationOptions: {
headerStyle: {
backgroundColor: Platform.OS === 'android' ? Colors.workSpaceNavigationPrimaryColor : ''
},
headerTintColor:
Platform.OS === 'android' ? 'white' : Colors.workSpaceNavigationPrimaryColor,
}
}
)
);


const UserWorkSpacesNavigator = createStackNavigator(
{
UserWorkspacesScreen: UserWorkspacesScreen,
UserJoinWorkspacesScreen:UserJoinWorkspacesScreen
}, {
defaultNavigationOptions: {
headerStyle: {
backgroundColor: Platform.OS === 'android' ? Colors.workSpaceNavigationPrimaryColor : ''
},
headerTintColor:
Platform.OS === 'android' ? 'white' : Colors.workSpaceNavigationPrimaryColor,
}
}
);

const Drawer = createDrawerNavigator(
{
MainRoute: Menu,
TitleRoute: Title,
FeedRoute: Feed,
FeedRoute: Feed,
MapRoute: myMap,
UserInfoRoute: UserInfo,
CreateWorkspaceRoute: CreateWorkspace,
MainScreenDrawer: {
screen: MainScreen,
},
DashboardRoute: Dashboard
DashboardRoute: Dashboard,
MainScreenDrawer: MainScreen,
'My Workspaces':UserWorkSpacesNavigator ,
'Workspaces Management' : AuthWorkSpacesNavigator
},
{
initialRouteName: 'MainScreenDrawer',
drawerPosition: 'right',
drawerBackgroundColor: '#C0C0C0',
drawerBackgroundColor: Colors.drawerNavigatorBackgroundColor,
contentOptions: {
labelStyle: {
color: 'white',
},
activeBackgroundColor: '#A0A0A0',
}
}
activeBackgroundColor: Colors.drawerNavigatorActivationColor,
},
contentComponent: props => {
const dispatch = useDispatch()
return (
<View style={{ flex: 1, paddingTop: 20 }}>
<SafeAreaView forceInset={{ bottom: 'always', horizontal: 'never' }}>
<DrawerNavigatorItems {...props} />
<Button
title="Logout"
color={Colors.drawerNavigatorTextColor}
onPress={() => {
dispatch(authActions.logout())
props.navigation.navigate('AuthenticationMenu')

}}
/>
</SafeAreaView>
</View>
);
}
},
)



const Authentication = createStackNavigator(
{
AuthenticationMenu: AuthenticationMenu,
SignUp: SignUp,
Login:Login
Login:Login,
UserInfo:UserInfo
},
{
defaultNavigationOptions: {
headerTitle: 'Studdy Buddy'
}
}
)

const MainNavigator = createSwitchNavigator({
// UserWorkspacesDrawer : UserWorkspacesScreen, // remove when finish editing workpsaces
Auth: Authentication,
DrawerNavigation: Drawer,

Expand Down
Loading

0 comments on commit 590c38f

Please sign in to comment.