Skip to content

Commit

Permalink
removes unused vars and unnecessary consoles #1,#2,#3
Browse files Browse the repository at this point in the history
  • Loading branch information
FarahZaqout committed Oct 3, 2019
1 parent 4d5821d commit 8bba34f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
14 changes: 3 additions & 11 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useContext } from 'react';
import React from 'react';
import { Switch } from 'react-router-dom';

// import routes here
Expand All @@ -7,11 +7,7 @@ import { MAP_URL, CONTROL_PANEL_URL } from '../constants/navRoutes';
// import components here
import MapInterface from './MapInterface';
import Admin from './Admin';
import {
useAuth0,
Auth0Provider,
Auth0Context,
} from './Auth0Login/Auth0Wrapper';
import { useAuth0, Auth0Provider } from './Auth0Login/Auth0Wrapper';
import PrivateRoute from './Auth0Login/PrivateRoute';
// import { routes } from '../constants/adminRoutes';

Expand All @@ -26,15 +22,11 @@ const onRedirectCallback = appState => {
};

function Index() {
useEffect(() => {
const token = localStorage.getItem('token');
console.log(token);
}, []);
const { loading } = useAuth0();
if (loading) return <h2>Loading...</h2>;
return (
<Switch>
<PrivateRoute exact path="/" component={MapInterface} />
<PrivateRoute exact path={MAP_URL} component={MapInterface} />
<PrivateRoute path={CONTROL_PANEL_URL} component={Admin} />
</Switch>
);
Expand Down
1 change: 0 additions & 1 deletion src/lambda/getLocations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import RentalRecord from './database/models/RentalRecord';
require('dotenv').config();

export async function handler(event, context) {
console.log(event.headers);
// eslint-disable-next-line no-param-reassign
context.callbackWaitsForEmptyEventLoop = false;
try {
Expand Down

0 comments on commit 8bba34f

Please sign in to comment.