Delete unused PublicRoute HOC

This commit is contained in:
rui hildt 2020-08-21 11:54:03 +02:00
parent 51ec69a3cb
commit fba62d4955
2 changed files with 1 additions and 26 deletions

View File

@ -1,25 +0,0 @@
import React from 'react';
import { Redirect, Route } from 'react-router-dom';
import { useAuth } from '../../helpers/authContext';
// TODO Make sure it's used, else delete it and remove message in App
const PublicRoute = ({ component: Component, ...rest }) => {
const isAuthenticated = useAuth();
return (
<Route
{...rest}
render={(props) =>
isAuthenticated ? (
<Redirect to='/dashboard' />
) : (
<Component {...props} />
)
}
/>
);
};
export default PublicRoute;

View File

@ -19,7 +19,7 @@ export default function Invite() {
const handleSelect = (value) => { const handleSelect = (value) => {
// TODO Verify if input contains an email // TODO Verify if input contains an email
// TODO Verify if email is already in the participants // Verify if email is already in the participants
let updatedContactDropdown = [...contactDropdown]; let updatedContactDropdown = [...contactDropdown];
if (value.length > 0) { if (value.length > 0) {