feat: Initial setup of theme.

This commit is contained in:
vikrant k
2022-01-13 22:28:45 +05:30
parent aaa083c184
commit fd2d9fa882
371 changed files with 17971 additions and 100 deletions

View File

@@ -0,0 +1,19 @@
import useAuthentication from 'hooks/useAuthentication';
import React from 'react';
import { Navigate } from 'react-router-dom';
import PropTypes from 'prop-types';
const PrivateRoute = ({ component }) => {
const { isAuthenticated } = useAuthentication();
if (isAuthenticated) {
return <>{component} </>;
}
return <Navigate to="/" />;
};
PrivateRoute.propTypes = {
component: PropTypes.any
};
export default PrivateRoute;