Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cypress/integration/homepage_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe("The Home Page", function() {
it("successfully loads", function() {
cy.visit("/");
});
});
describe('The Home Page', function() {
it('Visits team allegiance local host website', function() {
cy.visit('http://localhost:3000')
})
})
11 changes: 0 additions & 11 deletions cypress/integration/sample_spec.js

This file was deleted.

82 changes: 72 additions & 10 deletions package-lock.json

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

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"version": "0.1.0",
"private": true,
"devDependencies": {
"cypress": "^3.4.1",
"cypress": "^3.5.0",
"jest-dom": "^4.0.0"
},
"dependencies": {
"@auth0/auth0-spa-js": "^1.2.0",
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-solid-svg-icons": "^5.11.2",
"@fortawesome/react-fontawesome": "^0.1.7",
"@material-ui/core": "^4.4.1",
"@material-ui/icons": "^4.4.1",
"axios": "^0.19.0",
Expand All @@ -18,7 +21,7 @@
"node-sass": "^4.12.0",
"npm-check-updates": "^3.1.21",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-dom": "^16.11.0",
"react-dropzone": "^10.1.8",
"react-ga": "^2.6.0",
"react-moment": "^0.9.2",
Expand All @@ -31,7 +34,8 @@
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.0",
"socket.io-client": "^2.3.0",
"styled-components": "^4.3.2"
"styled-components": "^4.3.2",
"use-onclickoutside": "^0.3.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
61 changes: 27 additions & 34 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://cdn.bleacherreport.net" crossorigin />
<link
rel="preconnect"
href="https://www.google-analytics.com"
crossorigin
/>
<link rel="preconnect" href="https://dev-uzdmt05n.auth0.com" crossorigin />
<link
rel="preconnect"
href="https://labs15-allegiance.herokuapp.com"
crossorigin
/>
<link rel="preconnect" href="https://res.cloudinary.com" crossorigin />
<link rel="preconnect" href="https://api.mixpanel.com" crossorigin />
<meta name="theme-color" content="#1B4570" />
<meta
name="Description"
content="Sports-based social media app bringing together fans across the world!"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<!--

<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://cdn.bleacherreport.net" crossorigin />
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin />
<link rel="preconnect" href="https://dev-uzdmt05n.auth0.com" crossorigin />
<link rel="preconnect" href="https://labs15-allegiance.herokuapp.com" crossorigin />
<link rel="preconnect" href="https://res.cloudinary.com" crossorigin />
<link rel="preconnect" href="https://api.mixpanel.com" crossorigin />
<meta name="theme-color" content="#1B4570" />
<meta name="Description" content="Sports-based social media app bringing together fans across the world!" />
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -38,10 +28,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Allegiance</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
<title>Allegiance</title>

</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>

</html>
70 changes: 37 additions & 33 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import { withRouter } from 'react-router'
import axios from 'axios'
import { useDispatch, useSelector } from 'react-redux'
import moment from 'moment'

import styled from 'styled-components'
import { Loader } from 'semantic-ui-react'

import CssReset from 'styles/cssReset'
import PrivateRoute from './components/PrivateRoute'

import { initGA, logPageView } from './components/analytics/Analytics'
// // import { Mixpanel } from './components/analytics/Mixpanel'

import { useAuth0 } from './components/auth/react-auth0-wrapper'
import useGetToken from './components/utils/useGetToken'
Expand Down Expand Up @@ -69,12 +67,8 @@ function App(props) {
const { newUser, currentUser } = result.data.userInfo
if (newUser) {
props.history.push('/makeprofile')
// Mixpanel.login(newUser, 'New user sign up.')
}
if (currentUser && currentUser.first_name === null) {
props.history.push('/makeprofile')
// Mixpanel.login(currentUser, 'Successful login, no profile info.')
}

if (currentUser && currentUser.first_name !== null) {
const pushTo =
window.location.pathname !== '/'
Expand Down Expand Up @@ -133,36 +127,46 @@ function App(props) {

return (
<AppContainer>
<Switch>
<Route exact path='/' component={!isAuthenticated && Landing} />
<NavBar />
</Switch>
<Switch>
<Route exact path='/home' component={Feed} />
<PrivateRoute exact path='/makeprofile' component={MakeProfile} />
<PrivateRoute exact path='/creategroup' component={CreateGroup} />
<PrivateRoute exact path='/editgroup/:id' component={CreateGroup} />
<PrivateRoute exact path='/notifications' component={Notifications} />
<PrivateRoute exact path='/groups' component={GroupContainer} />
<PrivateRoute exact path='/profile' component={Profile} />
<PrivateRoute exact path='/group/:id' component={GroupPage} />
<PrivateRoute
exact
path='/allegiance/:id'
component={UnderConstruction}
/>
<PrivateRoute exact path='/addallegiance' component={AddAllegiance} />
<PrivateRoute exact path='/makeallegiance' component={MakeAllegiance} />
<PrivateRoute exact path='/post/:id' component={ReplyContainer} />
</Switch>
<CssReset />
{props.location.pathname !== '/' && <NavBar />}
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
<Switch>
<Route exact path='/' component={!isAuthenticated && Landing} />
<Route exact path='/home' component={Feed} />
<Route path='/groups' component={GroupContainer} />
<PrivateRoute exact path='/makeprofile' component={MakeProfile} />
<PrivateRoute exact path='/creategroup' component={CreateGroup} />
<PrivateRoute exact path='/editgroup/:id' component={CreateGroup} />
<PrivateRoute exact path='/notifications' component={Notifications} />
<PrivateRoute exact path='/profile' component={Profile} />
<PrivateRoute exact path='/group/:id' component={GroupPage} />
<PrivateRoute
exact
path='/allegiance/:id'
component={UnderConstruction}
/>
<PrivateRoute exact path='/addallegiance' component={AddAllegiance} />
<PrivateRoute
exact
path='/makeallegiance'
component={MakeAllegiance}
/>
<PrivateRoute exact path='/post/:id' component={ReplyContainer} />
</Switch>
</div>
</AppContainer>
)
}

const AppContainer = styled.div`
text-align: center;
padding-top: 11%;
padding-bottom: 12%;
background-color: #dee4e7;
min-height: 100vh;
`

export default withRouter(App)
// text-align: center;
// position: relative;
// background-color: #dee4e7;
// min-height: 100vh;
// margin: 0 auto;
// border: 4px solid blue;
Binary file added src/assets/LandingImage.psd
Binary file not shown.
Binary file added src/assets/jersey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/DoSportsTogether.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/LandingImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/Logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/NewWay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/SportIcons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/SportsBetter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/landing/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading