Delete unused PublicRoute HOC
This commit is contained in:
parent
51ec69a3cb
commit
fba62d4955
@ -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;
|
@ -19,7 +19,7 @@ export default function Invite() {
|
||||
|
||||
const handleSelect = (value) => {
|
||||
// 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];
|
||||
|
||||
if (value.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user