toggle-corp/react-store

View on GitHub
components/General/ExclusivelyPublicRoute.js

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';

import PrivateRoute from './PrivateRoute';

/*
 * ExclusivelyPublicRoute has inverted behavior to PrivateRoute
 * When user is authenticated, this route is inaccessible
 * And the user is redirect to 'redirectLink'
 */
const ExclusivelyPublicRoute = props => <PrivateRoute invertBehavior {...props} />;
export default ExclusivelyPublicRoute;