diff --git a/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx b/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx index 52d51933..0ed143a4 100644 --- a/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx +++ b/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx @@ -20,7 +20,6 @@ export default class BurgerModal extends React.Component {
-
diff --git a/src/front/Components/DesignSystem/Header/HeaderLink/classes.module.scss b/src/front/Components/DesignSystem/Header/HeaderLink/classes.module.scss index c8bb6f28..5d602668 100644 --- a/src/front/Components/DesignSystem/Header/HeaderLink/classes.module.scss +++ b/src/front/Components/DesignSystem/Header/HeaderLink/classes.module.scss @@ -19,4 +19,8 @@ bottom: 0; left: 0; } + + &.desactivated{ + cursor: not-allowed; + } } diff --git a/src/front/Components/DesignSystem/Header/HeaderLink/index.tsx b/src/front/Components/DesignSystem/Header/HeaderLink/index.tsx index bfe47b5f..64c154c4 100644 --- a/src/front/Components/DesignSystem/Header/HeaderLink/index.tsx +++ b/src/front/Components/DesignSystem/Header/HeaderLink/index.tsx @@ -1,11 +1,12 @@ -import React from "react"; -import classes from "./classes.module.scss"; -import Link from "next/link"; -import Typography, { ITypo } from "../../Typography"; import classNames from "classnames"; +import Link from "next/link"; import router from "next/router"; +import React from "react"; import { useEffect, useState } from "react"; +import Typography, { ITypo } from "../../Typography"; +import classes from "./classes.module.scss"; + type IPropsClass = { text: string | JSX.Element; path?: string; @@ -16,20 +17,30 @@ type IStateClass = {}; class HeaderLinkClass extends React.Component { public override render(): JSX.Element { - return ( - -
- {this.props.text} + if (this.props.path !== "" && this.props.path !== undefined) { + return ( + +
+ {this.props.text} +
+ {this.props.isActive &&
} + + ); + } else { + return ( +
+
+ {this.props.text} +
- {this.props.isActive &&
} - - ); + ); + } } } export default function HeaderLink(props: IPropsClass) { const [url, setUrl] = useState(""); useEffect(() => setUrl(router?.asPath), []); - const isActive = url === props.path; + const isActive = url.includes(props.path!); return ; } diff --git a/src/front/Components/DesignSystem/Header/Navigation/index.tsx b/src/front/Components/DesignSystem/Header/Navigation/index.tsx index b5af86cf..86069c31 100644 --- a/src/front/Components/DesignSystem/Header/Navigation/index.tsx +++ b/src/front/Components/DesignSystem/Header/Navigation/index.tsx @@ -10,7 +10,6 @@ export default class Navigation extends React.Component { public override render(): JSX.Element { return (
-
diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index d9a9ca24..5163de25 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -1,4 +1,5 @@ import "reflect-metadata"; + import ChevronIcon from "@Assets/Icons/chevron.svg"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import FolderBoxInformation from "@Front/Components/DesignSystem/FolderBoxInformation"; @@ -14,7 +15,6 @@ import BasePage from "../../Base"; import classes from "./classes.module.scss"; import ClientSection from "./ClientSection"; - type IPropsClass = { selectedFolderUid: string; }; @@ -105,8 +105,8 @@ class FolderInformationClass extends BasePage { // const selectedFolder = await Fodler.getInstance().getByUid(this.props.selectedFolderUid); // this.setState({ selectedFolder }); // console.log(folders); - for(const folder of folders) { - if(folder.uid === this.props.selectedFolderUid) { + for (const folder of folders) { + if (folder.uid === this.props.selectedFolderUid) { this.setState({ selectedFolder: folder }); break; }