mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-15 20:57:15 +00:00
20 lines
482 B
TypeScript
20 lines
482 B
TypeScript
import React from 'react';
|
|
import { useReactiveVar } from '@apollo/client';
|
|
import { Redirect } from 'react-router';
|
|
import { isLoggedInVar } from '../auth/checkAuthStatus';
|
|
import { PageRoutes } from '../../conf/Global';
|
|
|
|
export const NoPageFound = () => {
|
|
const isLoggedIn = useReactiveVar(isLoggedInVar);
|
|
|
|
if (!isLoggedIn) {
|
|
return <Redirect to={PageRoutes.LOG_IN} />;
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<p>Page Not Found!</p>
|
|
</div>
|
|
);
|
|
};
|