✨ CGU working
This commit is contained in:
parent
d7b9528334
commit
ecc96a63de
BIN
public/CGU_LeCoffre_io.pdf
Normal file
BIN
public/CGU_LeCoffre_io.pdf
Normal file
Binary file not shown.
@ -123,7 +123,7 @@ export default class BurgerModal extends React.Component<IProps, IState> {
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink path={Module.getInstance().get().modules.pages.MyAccount.props.path} text="Mon compte" />
|
||||
<NavigationLink text="CGU" />
|
||||
<NavigationLink target="_blank" path="/CGU_LeCoffre_io.pdf" text="CGU" />
|
||||
<div className={classes["separator"]} />
|
||||
<LogOutButton />
|
||||
</div>
|
||||
|
@ -12,6 +12,7 @@ type IProps = {
|
||||
isEnabled?: boolean;
|
||||
isActive?: boolean;
|
||||
routesActive?: string[];
|
||||
target?: "blank" | "self" | "_blank";
|
||||
};
|
||||
|
||||
type IPropsClass = IProps;
|
||||
@ -25,7 +26,8 @@ class NavigationLinkClass extends React.Component<IPropsClass, IStateClass> {
|
||||
<Link
|
||||
href={this.props.path ?? ""}
|
||||
className={classNames(classes["root"], this.props.isActive && [classes["active"]])}
|
||||
onClick={this.props.onClick}>
|
||||
onClick={this.props.onClick}
|
||||
target={this.props.target}>
|
||||
<div className={classes["content"]}>
|
||||
<Typography typo={this.props.isActive ? ITypo.P_SB_18 : ITypo.NAV_HEADER_18}>{this.props.text}</Typography>
|
||||
</div>
|
||||
@ -38,7 +40,7 @@ export default function NavigationLink(props: IProps) {
|
||||
const router = useRouter();
|
||||
const { pathname } = router;
|
||||
let isActive = props.path === pathname;
|
||||
if(props.routesActive){
|
||||
if (props.routesActive) {
|
||||
for (const routeActive of props.routesActive) {
|
||||
if (isActive) break;
|
||||
isActive = pathname.includes(routeActive);
|
||||
|
@ -96,7 +96,7 @@ export default class ProfileModal extends React.Component<IProps, IState> {
|
||||
]}
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink text="CGU" />
|
||||
<NavigationLink target="_blank" path="/CGU_LeCoffre_io.pdf" text="CGU" />
|
||||
<div className={classes["separator"]} />
|
||||
<LogOutButton />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user