'
-}
diff --git a/client/src/components/Logout.js b/client/src/components/Logout.js
deleted file mode 100644
index 0989985f7..000000000
--- a/client/src/components/Logout.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React, { Component } from 'react';
-import {Redirect} from 'react-router';
-import {auth} from '../App';
-
-class Logout extends Component {
- render() {
- //window.localStorage.removeItem("user");
- auth.logout();
-
- return
- }
-}
-
-export default Logout
diff --git a/client/src/components/Modules.js b/client/src/components/Modules.js
deleted file mode 100644
index aa69c80cb..000000000
--- a/client/src/components/Modules.js
+++ /dev/null
@@ -1,48 +0,0 @@
-import React from 'react';
-import Button from '@material-ui/core/Button';
-import Dialog from '@material-ui/core/Dialog';
-import DialogActions from '@material-ui/core/DialogActions';
-import DialogContent from '@material-ui/core/DialogContent';
-import DialogContentText from '@material-ui/core/DialogContentText';
-import DialogTitle from '@material-ui/core/DialogTitle';
-
-class Modules extends React.Component {
- state = {
- open: true,
- };
-
- handleClickOpen = () => {
- this.setState({ open: true });
- };
-
- handleClose = () => {
- this.setState({ open: false });
- };
-
- render() {
- return (
-
-
-
- );
- }
-}
-
-export default Modules;
diff --git a/client/src/components/Post.js b/client/src/components/Post.js
deleted file mode 100644
index 8ae8e1de1..000000000
--- a/client/src/components/Post.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import React, { Component } from 'react'
-import { connect } from 'react-redux'
-import { deletePost } from '../actions/postActions'
-
-class Post extends Component {
- handleClick = () => {
- this.props.deletePost(this.props.post.id);
- this.props.history.push('/');
- }
- render() {
-
- const post = this.props.post ? (
-
-
{this.props.post.title}
-
{this.props.post.body}
-
-
-
-
- ) : (
- Loading post...
- );
-
- return (
-
- {post}
-
- )
- }
-}
-
-const mapStateToProps = (state, ownProps) => {
- let id = ownProps.match.params.post_id;
- return {
- post: state.posts.find(post => post.id === id)
- }
-}
-
-const mapDispatchToProps = (dispatch) => {
- return {
- deletePost: (id) => dispatch(deletePost(id))
- }
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(Post)
diff --git a/client/src/components/index.js b/client/src/components/index.js
deleted file mode 100644
index 195ec74ff..000000000
--- a/client/src/components/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import NavBar from './navbar'
-import Footer from './footer'
-import Callback from './callback'
-import Home from './home'
-import About from './about'
-import Dashboard from './dashboard'
-import Teams from './teams'
-
-import { theme, globalStyles } from './theme'
-
-export {
- NavBar,
- Footer,
- Callback,
- Home,
- About,
- Dashboard,
- Teams,
- theme,
- globalStyles
-}
diff --git a/client/src/components/index0.js b/client/src/components/index0.js
deleted file mode 100644
index 195ec74ff..000000000
--- a/client/src/components/index0.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import NavBar from './navbar'
-import Footer from './footer'
-import Callback from './callback'
-import Home from './home'
-import About from './about'
-import Dashboard from './dashboard'
-import Teams from './teams'
-
-import { theme, globalStyles } from './theme'
-
-export {
- NavBar,
- Footer,
- Callback,
- Home,
- About,
- Dashboard,
- Teams,
- theme,
- globalStyles
-}
diff --git a/client/src/registerServiceWorker.js b/client/src/registerServiceWorker.js
deleted file mode 100644
index a3e6c0cfc..000000000
--- a/client/src/registerServiceWorker.js
+++ /dev/null
@@ -1,117 +0,0 @@
-// In production, we register a service worker to serve assets from local cache.
-
-// This lets the app load faster on subsequent visits in production, and gives
-// it offline capabilities. However, it also means that developers (and users)
-// will only see deployed updates on the "N+1" visit to a page, since previously
-// cached resources are updated in the background.
-
-// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
-// This link also includes instructions on opting out of this behavior.
-
-const isLocalhost = Boolean(
- window.location.hostname === 'localhost' ||
- // [::1] is the IPv6 localhost address.
- window.location.hostname === '[::1]' ||
- // 127.0.0.1/8 is considered localhost for IPv4.
- window.location.hostname.match(
- /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
- )
-);
-
-export default function register() {
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
- // The URL constructor is available in all browsers that support SW.
- const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
- if (publicUrl.origin !== window.location.origin) {
- // Our service worker won't work if PUBLIC_URL is on a different origin
- // from what our page is served on. This might happen if a CDN is used to
- // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
- return;
- }
-
- window.addEventListener('load', () => {
- const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
-
- if (isLocalhost) {
- // This is running on localhost. Lets check if a service worker still exists or not.
- checkValidServiceWorker(swUrl);
-
- // Add some additional logging to localhost, pointing developers to the
- // service worker/PWA documentation.
- navigator.serviceWorker.ready.then(() => {
- console.log(
- 'This web app is being served cache-first by a service ' +
- 'worker. To learn more, visit https://goo.gl/SC7cgQ'
- );
- });
- } else {
- // Is not local host. Just register service worker
- registerValidSW(swUrl);
- }
- });
- }
-}
-
-function registerValidSW(swUrl) {
- navigator.serviceWorker
- .register(swUrl)
- .then(registration => {
- registration.onupdatefound = () => {
- const installingWorker = registration.installing;
- installingWorker.onstatechange = () => {
- if (installingWorker.state === 'installed') {
- if (navigator.serviceWorker.controller) {
- // At this point, the old content will have been purged and
- // the fresh content will have been added to the cache.
- // It's the perfect time to display a "New content is
- // available; please refresh." message in your web app.
- console.log('New content is available; please refresh.');
- } else {
- // At this point, everything has been precached.
- // It's the perfect time to display a
- // "Content is cached for offline use." message.
- console.log('Content is cached for offline use.');
- }
- }
- };
- };
- })
- .catch(error => {
- console.error('Error during service worker registration:', error);
- });
-}
-
-function checkValidServiceWorker(swUrl) {
- // Check if the service worker can be found. If it can't reload the page.
- fetch(swUrl)
- .then(response => {
- // Ensure service worker exists, and that we really are getting a JS file.
- if (
- response.status === 404 ||
- response.headers.get('content-type').indexOf('javascript') === -1
- ) {
- // No service worker found. Probably a different app. Reload the page.
- navigator.serviceWorker.ready.then(registration => {
- registration.unregister().then(() => {
- window.location.reload();
- });
- });
- } else {
- // Service worker found. Proceed as normal.
- registerValidSW(swUrl);
- }
- })
- .catch(() => {
- console.log(
- 'No internet connection found. App is running in offline mode.'
- );
- });
-}
-
-export function unregister() {
- if ('serviceWorker' in navigator) {
- navigator.serviceWorker.ready.then(registration => {
- registration.unregister();
- });
- }
-}
diff --git a/client/src/theme.js b/client/src/theme.js
index 1d7900e4a..96492c48c 100644
--- a/client/src/theme.js
+++ b/client/src/theme.js
@@ -59,11 +59,6 @@ export const globalStyles = theme => ({
[theme.breakpoints.up('sm')]: {
paddingBottom: theme.spacing.unit * 2
}
- },
- footer: {
- marginTop: theme.spacing.unit * 8,
- borderTop: `1px solid ${theme.palette.divider}`,
- padding: `${theme.spacing.unit * 6}px 0`
}
})
diff --git a/client/src/utils/js-helpers.js b/client/src/utils/js-helpers.js
deleted file mode 100644
index 55dc73320..000000000
--- a/client/src/utils/js-helpers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-export function isDefined (d) {
- return d !== null && typeof d !== 'undefined'
-}
-
-export function isNotDefined (d) {
- return !isDefined(d)
-}
-
-export const isArray = Array.isArray
-
-export function isObject (d) {
- return isDefined(d) && typeof d === 'object' && !Array.isArray(d)
-}
-
-export function isEmpty (obj) {
- for (var key in obj) {
- if (obj.hasOwnProperty(key)) return false
- }
- return true
-}
-
-export function validObject (object, ...keys) {
- return keys.reduce((a, b) => (a || { })[b], object) !== undefined
-}
-
-export function mergeDeep (target, ...sources) {
- if (!sources.length) return target
- const source = sources.shift()
-
- if (isObject(target) && isObject(source)) {
- for (const key in source) {
- if (isObject(source[key])) {
- if (!target[key]) Object.assign(target, { [key]: {} })
- mergeDeep(target[key], source[key])
- } else {
- Object.assign(target, { [key]: source[key] })
- }
- }
- }
- return mergeDeep(target, ...sources)
-}
-
-export function deleteCookie (c) {
- document.cookie.split(';').forEach(function (c) { document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/') })
-}
-
-export function slugify (string) {
- const a = 'àáäâãåèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'
- const b = 'aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------'
- const p = new RegExp(a.split('').join('|'), 'g')
-
- return string.toString().toLowerCase()
- .replace(/\s+/g, '-') // Replace spaces with -
- .replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
- .replace(/&/g, '-and-') // Replace & with 'and'
- .replace(/[^\w-]+/g, '') // Remove all non-word characters
- .replace(/--+/g, '-') // Replace multiple - with single -
- .replace(/^-+/, '') // Trim - from start of text
- .replace(/-+$/, '') // Trim - from end of text
-}
diff --git a/client/src/utils/local-storage.js b/client/src/utils/local-storage.js
deleted file mode 100644
index 98220f61d..000000000
--- a/client/src/utils/local-storage.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const getStateFromStorage = version => {
- const localState = JSON.parse(window.localStorage.getItem('aa-team'))
-
- try {
- if (localState !== undefined && localState !== null) {
- if (
- localState.appVersion !== undefined &&
- localState.appVersion !== null
- ) {
- if (localState.appVersion === version) {
- return localState
- }
- }
- } else {
- throw new Error()
- }
- } catch (error) {
- return false
- }
-}
-
-const storeStateInStorage = state =>
- window.localStorage.setItem('aa-team', JSON.stringify(state))
-
-const getItem = async name => window.localStorage.getItem(name)
-const setItem = async (name, value) => window.localStorage.setItem(name, value)
-const removeItem = async name => window.localStorage.removeItem(name)
-
-export {
- getStateFromStorage,
- storeStateInStorage,
- getItem,
- setItem,
- removeItem
-}