26 lines
561 B
TypeScript
Raw Normal View History

2022-09-17 22:54:00 +02:00
import Head from "next/head";
import { useEffect, useState } from "react";
const Admin = () => {
// Load the admin client-side
const [DynamicAdmin, setDynamicAdmin] = useState(<p>Loading...</p>);
useEffect(() => {
(async () => {
const HydraAdmin = (await import("@api-platform/admin")).HydraAdmin;
setDynamicAdmin(<HydraAdmin entrypoint={window.origin}></HydraAdmin>);
})();
}, []);
return (
<>
<Head>
<title>API Platform Admin</title>
</Head>
{DynamicAdmin}
</>
);
};
export default Admin;