Add loader until page loads completely
This commit is contained in:
@@ -14,9 +14,16 @@ export default function TermsOfService(props) {
|
||||
}
|
||||
];
|
||||
|
||||
const page = props.page;
|
||||
const logEvent = props.logEvent;
|
||||
|
||||
useEffect(() => {
|
||||
props.logEvent("page_view");
|
||||
});
|
||||
if (page) {
|
||||
page.load();
|
||||
return () => page.unload();
|
||||
}
|
||||
if (logEvent) logEvent("page_view");
|
||||
}, [logEvent, page]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user