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