chore(build): try to build demo and docs (#3434)
This commit is contained in:
1 parent
869b8ced05
commit
828690cd3b
329 files changed
+1896
-1010
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
import { useUserAuthentication } from '@ohif/ui';
|
||||
|
||||
export const PrivateRoute = ({ children, handleUnauthenticated }) => {
|
||||
const [{ user, enabled }] = useUserAuthentication();
|
||||
|
||||
if (enabled && !user) {
|
||||
return handleUnauthenticated();
|
||||
}
|
||||
|
||||
return children;
|
||||
};
|
||||
|
||||
export default PrivateRoute;
|
||||
Reference in new issue
Block a user