├── functions ├── .gitignore ├── package.json ├── index.js └── .eslintrc.json ├── .firebaserc ├── public ├── favicon.ico ├── assets │ ├── logo.png │ ├── user.png │ └── categoryImages │ │ ├── film.jpg │ │ ├── food.jpg │ │ ├── culture.jpg │ │ ├── drinks.jpg │ │ ├── music.jpg │ │ └── travel.jpg ├── manifest.json └── index.html ├── src ├── features │ ├── auth │ │ ├── authConstants.js │ │ ├── AuthWrapper.jsx │ │ ├── authReducer.js │ │ ├── SocialLogin │ │ │ └── SocialLogin.jsx │ │ ├── Login │ │ │ └── LoginForm.jsx │ │ ├── Register │ │ │ └── RegisterForm.jsx │ │ └── authActions.js │ ├── modals │ │ ├── modalConstants.js │ │ ├── modalActions.js │ │ ├── modalReducer.js │ │ ├── TestModal.jsx │ │ ├── LoginModal.jsx │ │ ├── RegisterModal.jsx │ │ ├── ModalManager.jsx │ │ └── UnauthModal.jsx │ ├── testarea │ │ ├── testConstants.js │ │ ├── testReducer.js │ │ ├── SimpleMap.jsx │ │ ├── testActions.js │ │ ├── TestPlaceInput.jsx │ │ └── TestComponent.jsx │ ├── async │ │ ├── asyncConstants.js │ │ ├── asyncActions.js │ │ └── asyncReducer.js │ ├── event │ │ ├── eventConstants.js │ │ ├── EventList │ │ │ ├── EventListAttendee.jsx │ │ │ ├── EventList.jsx │ │ │ └── EventListItem.jsx │ │ ├── EventActivity │ │ │ ├── EventActivity.jsx │ │ │ └── EventActivityItem.jsx │ │ ├── EventDetailed │ │ │ ├── EventDetailedMap.jsx │ │ │ ├── EventDetailedChatForm.jsx │ │ │ ├── EventDetailedSidebar.jsx │ │ │ ├── EventDetailedInfo.jsx │ │ │ ├── EventDetailedHeader.jsx │ │ │ ├── EventDetailedPage.jsx │ │ │ └── EventDetailedChat.jsx │ │ ├── eventReducer.js │ │ ├── EventDashboard │ │ │ └── EventDashboard.jsx │ │ ├── eventActions.js │ │ └── EventForm │ │ │ └── EventForm.jsx │ ├── user │ │ ├── PeopleDashboard │ │ │ └── PeopleDashboard.jsx │ │ ├── userQueries.js │ │ ├── UserDetailed │ │ │ ├── UserDetailedSidebar.jsx │ │ │ ├── UserDetailedPhotos.jsx │ │ │ ├── UserDetailedHeader.jsx │ │ │ ├── UserDetailedDescription.jsx │ │ │ ├── UserDetailedEvents.jsx │ │ │ └── UserDetailedPage.jsx │ │ ├── Settings │ │ │ ├── Photos │ │ │ │ ├── DropzoneInput.jsx │ │ │ │ ├── CropperInput.jsx │ │ │ │ ├── UserPhotos.jsx │ │ │ │ └── PhotosPage.jsx │ │ │ ├── SettingsNav.jsx │ │ │ ├── SettingsDashboard.jsx │ │ │ ├── BasicPage.jsx │ │ │ ├── AboutPage.jsx │ │ │ └── AccountPage.jsx │ │ └── userActions.js │ ├── nav │ │ ├── Menus │ │ │ ├── SignedOutMenu.jsx │ │ │ └── SignedInMenu.jsx │ │ └── NavBar │ │ │ └── NavBar.jsx │ └── home │ │ └── HomePage.jsx ├── app │ ├── common │ │ ├── util │ │ │ ├── reducerUtils.js │ │ │ ├── ScrollToTop.jsx │ │ │ └── helpers.js │ │ └── form │ │ │ ├── RadioInput.jsx │ │ │ ├── TextInput.jsx │ │ │ ├── TextArea.jsx │ │ │ ├── SelectInput.jsx │ │ │ ├── DateInput.jsx │ │ │ └── PlaceInput.jsx │ ├── data │ │ ├── mockApi.js │ │ └── sampleData.js │ ├── layout │ │ ├── LoadingComponent.jsx │ │ └── App.jsx │ ├── config │ │ └── firebase.js │ ├── reducers │ │ └── rootReducer.js │ └── store │ │ └── configureStore.js ├── index.js ├── index.css └── serviceWorker.js ├── .gitignore ├── firebase.json ├── .vscode └── launch.json ├── package.json ├── README.md └── firebase-debug.log /functions/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "revents-2c2ee" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/logo.png -------------------------------------------------------------------------------- /public/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/user.png -------------------------------------------------------------------------------- /src/features/auth/authConstants.js: -------------------------------------------------------------------------------- 1 | export const LOGIN_USER = 'LOGIN_USER'; 2 | export const SIGN_OUT_USER = 'SIGN_OUT_USER'; -------------------------------------------------------------------------------- /src/features/modals/modalConstants.js: -------------------------------------------------------------------------------- 1 | export const MODAL_OPEN = 'MODAL_OPEN'; 2 | export const MODAL_CLOSE = 'MODAL_CLOSE'; -------------------------------------------------------------------------------- /public/assets/categoryImages/film.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/film.jpg -------------------------------------------------------------------------------- /public/assets/categoryImages/food.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/food.jpg -------------------------------------------------------------------------------- /public/assets/categoryImages/culture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/culture.jpg -------------------------------------------------------------------------------- /public/assets/categoryImages/drinks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/drinks.jpg -------------------------------------------------------------------------------- /public/assets/categoryImages/music.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/music.jpg -------------------------------------------------------------------------------- /public/assets/categoryImages/travel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TryCatchLearn/ReventsUpdate/HEAD/public/assets/categoryImages/travel.jpg -------------------------------------------------------------------------------- /src/features/testarea/testConstants.js: -------------------------------------------------------------------------------- 1 | export const INCREMENT_COUNTER = 'INCREMENT_COUNTER'; 2 | export const DECREMENT_COUNTER = 'DECREMENT_COUNTER'; -------------------------------------------------------------------------------- /src/features/async/asyncConstants.js: -------------------------------------------------------------------------------- 1 | export const ASYNC_ACTION_START = 'ASYNC_ACTION_START'; 2 | export const ASYNC_ACTION_FINISH = 'ASYNC_ACTION_FINISH'; 3 | export const ASYNC_ACTION_ERROR = 'ASYNC_ACTION_ERROR'; -------------------------------------------------------------------------------- /src/features/event/eventConstants.js: -------------------------------------------------------------------------------- 1 | export const CREATE_EVENT = 'CREATE_EVENT'; 2 | export const UPDATE_EVENT = 'UPDATE_EVENT'; 3 | export const DELETE_EVENT = 'DELETE_EVENT'; 4 | export const FETCH_EVENTS = 'FETCH_EVENTS'; -------------------------------------------------------------------------------- /src/app/common/util/reducerUtils.js: -------------------------------------------------------------------------------- 1 | export const createReducer = (initialState, fnMap) => { 2 | return (state = initialState, {type, payload}) => { 3 | const handler = fnMap[type]; 4 | 5 | return handler ? handler(state, payload) : state 6 | } 7 | } -------------------------------------------------------------------------------- /src/features/user/PeopleDashboard/PeopleDashboard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const PeopleDashboard = () => { 4 | return ( 5 |
6 |

People dashboard

7 |
8 | ) 9 | } 10 | 11 | export default PeopleDashboard 12 | -------------------------------------------------------------------------------- /src/app/data/mockApi.js: -------------------------------------------------------------------------------- 1 | import sampleData from "./sampleData"; 2 | 3 | const delay = (ms) => { 4 | return new Promise(resolve => setTimeout(resolve, ms)) 5 | } 6 | 7 | export const fetchSampleData = () => { 8 | return delay(1000).then(() => { 9 | return Promise.resolve(sampleData) 10 | }) 11 | } -------------------------------------------------------------------------------- /src/app/layout/LoadingComponent.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Dimmer, Loader } from 'semantic-ui-react'; 3 | 4 | const LoadingComponent = ({inverted = true}) => { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | 12 | export default LoadingComponent 13 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/features/modals/modalActions.js: -------------------------------------------------------------------------------- 1 | import { MODAL_OPEN, MODAL_CLOSE } from './modalConstants'; 2 | 3 | export const openModal = (modalType, modalProps) => { 4 | return { 5 | type: MODAL_OPEN, 6 | payload: { 7 | modalType, 8 | modalProps 9 | } 10 | }; 11 | }; 12 | 13 | export const closeModal = () => { 14 | return { 15 | type: MODAL_CLOSE 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "predeploy": [ 4 | "npm --prefix \"$RESOURCE_DIR\" run lint" 5 | ] 6 | }, 7 | "hosting": { 8 | "public": "build", 9 | "ignore": [ 10 | "firebase.json", 11 | "**/.*", 12 | "**/node_modules/**" 13 | ], 14 | "rewrites": [ 15 | { 16 | "source": "**", 17 | "destination": "/index.html" 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/common/form/RadioInput.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {Form} from 'semantic-ui-react' 3 | 4 | const RadioInput = ({input, width, type, label}) => { 5 | return ( 6 | 7 |
8 | {' '} 9 | 10 |
11 |
12 | ) 13 | } 14 | 15 | export default RadioInput 16 | -------------------------------------------------------------------------------- /src/app/common/util/ScrollToTop.jsx: -------------------------------------------------------------------------------- 1 | import { Component } from 'react'; 2 | import { withRouter } from 'react-router-dom'; 3 | 4 | class ScrollToTop extends Component { 5 | componentDidUpdate(prevProps) { 6 | if (this.props.location.pathname !== prevProps.location.pathname) { 7 | window.scrollTo(0, 0); 8 | } 9 | } 10 | 11 | render() { 12 | return this.props.children; 13 | } 14 | } 15 | 16 | export default withRouter(ScrollToTop); 17 | -------------------------------------------------------------------------------- /src/features/async/asyncActions.js: -------------------------------------------------------------------------------- 1 | import { ASYNC_ACTION_START, ASYNC_ACTION_FINISH, ASYNC_ACTION_ERROR } from "./asyncConstants"; 2 | 3 | export const asyncActionStart = () => { 4 | return { 5 | type: ASYNC_ACTION_START 6 | } 7 | } 8 | 9 | export const asyncActionFinish = () => { 10 | return { 11 | type: ASYNC_ACTION_FINISH 12 | } 13 | } 14 | 15 | export const asyncActionError = () => { 16 | return { 17 | type: ASYNC_ACTION_ERROR 18 | } 19 | } -------------------------------------------------------------------------------- /src/app/common/form/TextInput.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Form, Label } from 'semantic-ui-react'; 3 | 4 | const TextInput = ({ 5 | input, 6 | width, 7 | type, 8 | placeholder, 9 | meta: { touched, error } 10 | }) => { 11 | return ( 12 | 13 | 14 | {touched && error &&} 15 | 16 | ) 17 | 18 | }; 19 | 20 | export default TextInput; 21 | -------------------------------------------------------------------------------- /src/features/modals/modalReducer.js: -------------------------------------------------------------------------------- 1 | import { createReducer } from "../../app/common/util/reducerUtils"; 2 | import { MODAL_OPEN, MODAL_CLOSE } from "./modalConstants"; 3 | 4 | const initialState = null; 5 | 6 | const openModal = (state, payload) => { 7 | const {modalType, modalProps} = payload; 8 | 9 | return {modalType, modalProps} 10 | } 11 | 12 | const closeModal = (state) => { 13 | return null; 14 | } 15 | 16 | export default createReducer(initialState, { 17 | [MODAL_OPEN]: openModal, 18 | [MODAL_CLOSE]: closeModal 19 | }) -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "chrome", 9 | "request": "launch", 10 | "name": "Launch Chrome against localhost", 11 | "url": "http://localhost:3000", 12 | "webRoot": "${workspaceFolder}/src" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/features/auth/AuthWrapper.jsx: -------------------------------------------------------------------------------- 1 | import {connectedReduxRedirect} from 'redux-auth-wrapper/history4/redirect'; 2 | import {openModal} from '../modals/modalActions'; 3 | 4 | export const UserIsAuthenticated = connectedReduxRedirect({ 5 | wrapperDisplayName: 'UserIsAuthenticated', 6 | allowRedirectBack: true, 7 | redirectPath:'/events', 8 | authenticatedSelector: ({firebase: {auth}}) => 9 | auth.isLoaded && !auth.isEmpty, 10 | redirectAction: newLoc => (dispatch) => { 11 | dispatch(openModal('UnauthModal')) 12 | } 13 | }) -------------------------------------------------------------------------------- /src/features/nav/Menus/SignedOutMenu.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Menu, Button } from 'semantic-ui-react'; 3 | 4 | const SignedOutMenu = ({signIn, register}) => { 5 | return ( 6 | 7 |