24 lines
660 B
TypeScript
24 lines
660 B
TypeScript
import DefaultLegalDashboard, { ELegalOptions } from "@Front/Components/LayoutTemplates/DefaultLegalDashboard";
|
|
import { useRouter } from "next/router";
|
|
import Module from "@Front/Config/Module";
|
|
import { useEffect } from "react";
|
|
|
|
type IProps = {};
|
|
|
|
export default function Legal(props: IProps) {
|
|
const router = useRouter();
|
|
const { legalUid } = router.query;
|
|
|
|
useEffect(() => {
|
|
if (!legalUid && router.isReady) {
|
|
router.push(
|
|
Module.getInstance()
|
|
.get()
|
|
.modules.pages.Legal.pages.LegalInformations.props.path.replace("[legalUid]", ELegalOptions.LEGAL_MENTIONS),
|
|
);
|
|
}
|
|
}, [legalUid, router]);
|
|
|
|
return <DefaultLegalDashboard />;
|
|
}
|