diff --git a/cypress/integration/homepage_spec.js b/cypress/integration/homepage_spec.js index 0ef0b87..320f3d6 100644 --- a/cypress/integration/homepage_spec.js +++ b/cypress/integration/homepage_spec.js @@ -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') + }) +}) diff --git a/cypress/integration/sample_spec.js b/cypress/integration/sample_spec.js deleted file mode 100644 index 691ad65..0000000 --- a/cypress/integration/sample_spec.js +++ /dev/null @@ -1,11 +0,0 @@ -describe("My First Test", function() { - it("Does not do much!", function() { - expect(true).to.equal(true); - }); -}); - -describe("My First Test", function() { - it("Does not do much!", function() { - expect(true).to.equal(false); - }); -}); diff --git a/package-lock.json b/package-lock.json index 9a8116d..a3234db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1069,6 +1069,35 @@ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.4.tgz", "integrity": "sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ==" }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.25.tgz", + "integrity": "sha512-3RuZPDuuPELd7RXtUqTCfed14fcny9UiPOkdr2i+cYxBoTOfQgxcDoq77fHiiHcgWuo1LoBUpvGxFF1H/y7s3Q==" + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.25", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.25.tgz", + "integrity": "sha512-MotKnn53JKqbkLQiwcZSBJVYtTgIKFbh7B8+kd05TSnfKYPFmjKKI59o2fpz5t0Hzl35vVGU6+N4twoOpZUrqA==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.25" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.11.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.11.2.tgz", + "integrity": "sha512-zBue4i0PAZJUXOmLBBvM7L0O7wmsDC8dFv9IhpW5QL4kT9xhhVUsYg/LX1+5KaukWq4/cbDcKT+RT1aRe543sg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.25" + } + }, + "@fortawesome/react-fontawesome": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.7.tgz", + "integrity": "sha512-AHWSzOsHBe5vqOkrvs+CKw+8eLl+0XZsVixOWhTPpGpOA8WQUbVU6J9cmtAvTaxUU5OIf+rgxxF8ZKc3BVldxg==", + "requires": { + "prop-types": "^15.5.10" + } + }, "@hapi/address": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.0.0.tgz", @@ -2374,6 +2403,12 @@ "@types/react": "*" } }, + "@types/sizzle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", + "dev": true + }, "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", @@ -2814,6 +2849,11 @@ "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", "dev": true }, + "are-passive-events-supported": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/are-passive-events-supported/-/are-passive-events-supported-1.1.1.tgz", + "integrity": "sha512-5wnvlvB/dTbfrCvJ027Y4L4gW/6Mwoy1uFSavney0YO++GU+0e/flnjiBBwH+1kh7xNCgCOGvmJC3s32joYbww==" + }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", @@ -4929,13 +4969,14 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" }, "cypress": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.4.1.tgz", - "integrity": "sha512-1HBS7t9XXzkt6QHbwfirWYty8vzxNMawGj1yI+Fu6C3/VZJ8UtUngMW6layqwYZzLTZV8tiDpdCNBypn78V4Dg==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.5.0.tgz", + "integrity": "sha512-I1iSReD2C8CTP6s4BvQky4gEqHBnKLmhBIqFyCUZdj6BQ6ZDxGnmIbQPM5g79E2iP60KTIbTK99ZPSDVtsNUUg==", "dev": true, "requires": { "@cypress/listr-verbose-renderer": "0.4.1", "@cypress/xvfb": "1.2.4", + "@types/sizzle": "2.3.2", "arch": "2.1.1", "bluebird": "3.5.0", "cachedir": "1.3.0", @@ -4962,6 +5003,7 @@ "request-progress": "3.0.0", "supports-color": "5.5.0", "tmp": "0.1.0", + "untildify": "3.0.3", "url": "0.11.0", "yauzl": "2.10.0" }, @@ -14343,14 +14385,14 @@ } }, "react-dom": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.9.0.tgz", - "integrity": "sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.11.0.tgz", + "integrity": "sha512-nrRyIUE1e7j8PaXSPtyRKtz+2y9ubW/ghNgqKFHHAHaeP0fpF5uXR+sq8IMRHC+ZUxw7W9NyCDTBtwWxvkb0iA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.15.0" + "scheduler": "^0.17.0" } }, "react-dropzone": { @@ -15524,9 +15566,9 @@ } }, "scheduler": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.15.0.tgz", - "integrity": "sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.17.0.tgz", + "integrity": "sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -17164,6 +17206,12 @@ } } }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", + "dev": true + }, "upath": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", @@ -17265,6 +17313,20 @@ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, + "use-latest": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.0.0.tgz", + "integrity": "sha512-CxmFi75KTXeTIBlZq3LhJ4Hz98pCaRKZHCpnbiaEHIr5QnuHvH8lKYoluPBt/ik7j/hFVPB8K3WqF6mQvLyQTg==" + }, + "use-onclickoutside": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/use-onclickoutside/-/use-onclickoutside-0.3.1.tgz", + "integrity": "sha512-aahvbW5+G0XJfzj31FJeLsvc6qdKbzeTsQ8EtkHHq5qTg6bm/qkJeKLcgrpnYeHDDbd7uyhImLGdkbM9BRzOHQ==", + "requires": { + "are-passive-events-supported": "^1.1.0", + "use-latest": "^1.0.0" + } + }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", diff --git a/package.json b/package.json index e777ec0..df8936c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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", diff --git a/public/index.html b/public/index.html index b8b55ce..c8c25dc 100644 --- a/public/index.html +++ b/public/index.html @@ -1,35 +1,25 @@ - - - - - - - - - - - - - - - - - Allegiance - - - -
- - + Allegiance + + + + + +
+ + + \ No newline at end of file diff --git a/src/App.js b/src/App.js index bada585..7af0e07 100644 --- a/src/App.js +++ b/src/App.js @@ -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' @@ -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 !== '/' @@ -133,36 +127,46 @@ function App(props) { return ( - - - - - - - - - - - - - - - - - - + + {props.location.pathname !== '/' && } +
+ + + + + + + + + + + + + + + +
) } 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; diff --git a/src/assets/LandingImage.psd b/src/assets/LandingImage.psd new file mode 100644 index 0000000..2db4595 Binary files /dev/null and b/src/assets/LandingImage.psd differ diff --git a/src/assets/jersey.png b/src/assets/jersey.png new file mode 100644 index 0000000..28fe218 Binary files /dev/null and b/src/assets/jersey.png differ diff --git a/src/assets/landing/DoSportsTogether.png b/src/assets/landing/DoSportsTogether.png new file mode 100644 index 0000000..f8a46b2 Binary files /dev/null and b/src/assets/landing/DoSportsTogether.png differ diff --git a/src/assets/landing/LandingImage.png b/src/assets/landing/LandingImage.png new file mode 100644 index 0000000..326368c Binary files /dev/null and b/src/assets/landing/LandingImage.png differ diff --git a/src/assets/landing/Logo2.png b/src/assets/landing/Logo2.png new file mode 100644 index 0000000..7b90870 Binary files /dev/null and b/src/assets/landing/Logo2.png differ diff --git a/src/assets/landing/NewWay.png b/src/assets/landing/NewWay.png new file mode 100644 index 0000000..20be4d4 Binary files /dev/null and b/src/assets/landing/NewWay.png differ diff --git a/src/assets/landing/SportIcons.png b/src/assets/landing/SportIcons.png new file mode 100644 index 0000000..fd1185c Binary files /dev/null and b/src/assets/landing/SportIcons.png differ diff --git a/src/assets/landing/SportsBetter.png b/src/assets/landing/SportsBetter.png new file mode 100644 index 0000000..f592a2c Binary files /dev/null and b/src/assets/landing/SportsBetter.png differ diff --git a/src/assets/landing/facebook.png b/src/assets/landing/facebook.png new file mode 100644 index 0000000..38d3054 Binary files /dev/null and b/src/assets/landing/facebook.png differ diff --git a/src/assets/landing/instagram.png b/src/assets/landing/instagram.png new file mode 100644 index 0000000..1a82ca9 Binary files /dev/null and b/src/assets/landing/instagram.png differ diff --git a/src/assets/landing/twitter.png b/src/assets/landing/twitter.png new file mode 100644 index 0000000..2b48e0f Binary files /dev/null and b/src/assets/landing/twitter.png differ diff --git a/src/assets/LandingImage.jpg b/src/assets/oldLandingImage.jpg similarity index 100% rename from src/assets/LandingImage.jpg rename to src/assets/oldLandingImage.jpg diff --git a/src/components/Landing.js b/src/components/Landing.js index 90ccfc7..90fb48a 100644 --- a/src/components/Landing.js +++ b/src/components/Landing.js @@ -1,78 +1,194 @@ -import React from 'react' +import React, { useState, useEffect } from 'react' +import { axiosWithAuth } from './utils/axiosWithAuth' +import useGetToken from './utils/useGetToken' +import useForm from './utils/useForm' +import useDebounce from './utils/useDebounce' +import TextField from '@material-ui/core/TextField' +import { makeStyles } from '@material-ui/core/styles' + +import SearchBar from './groups/SearchBar' + import { Button, Image } from 'semantic-ui-react' import styled from 'styled-components' +import { createGlobalStyle } from 'styled-components' import { useAuth0 } from './auth/react-auth0-wrapper' -import Logo from '../assets/Logo.png' -import LandingImage from '../assets/LandingImage.jpg' -// import Button from '../styled/Landing.scss' + +// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +// import { faCoffee } from '@fortawesome/free-solid-svg-icons' +import Logo2 from '../assets/landing/Logo2.png' +import LandingImage from '../assets/landing/LandingImage.png' +import DoSportsTogether from '../assets/landing/DoSportsTogether.png' +import instagram from '../assets/landing/instagram.png' +import twitter from '../assets/landing/twitter.png' +import facebook from '../assets/landing/facebook.png' +import NewWay from '../assets/landing/NewWay.png' +import SportsBetter from '../assets/landing/SportsBetter.png' +import SportIcons from '../assets/landing/SportIcons.png' const Landing = () => { const { loginWithRedirect } = useAuth0() return ( - - - {'Logo'} -

ALLEGIANCE

-
- The social network for sports fans - - {/*