From 395527cb1efab52a754cc65d443ee21ce6e4fb7d Mon Sep 17 00:00:00 2001 From: OxSaitama Date: Wed, 12 Apr 2023 19:07:28 +0200 Subject: [PATCH] refacto login page --- .../Layouts/Folder/ClientSection/index.tsx | 4 +- .../Layouts/LoginCallback/index.tsx | 43 +++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/front/Components/Layouts/Folder/ClientSection/index.tsx b/src/front/Components/Layouts/Folder/ClientSection/index.tsx index 0caa2007..37e72e67 100644 --- a/src/front/Components/Layouts/Folder/ClientSection/index.tsx +++ b/src/front/Components/Layouts/Folder/ClientSection/index.tsx @@ -29,10 +29,10 @@ export default class ClientSection extends React.Component { } private renderCustomerFolders() { - const output = this.props.folder.office_folder_has_customers?.map((folderHasCustomer) => { + const output = this.props.folder.office_folder_has_customers?.map((folderHasCustomer, key) => { if (!folderHasCustomer.customer) return null; // TODO : Les documents ASKED fonctionne mais les autres documents ne doivcent etre seulement ceux qui correspondent au folder - return
; + return
; }) return output ?? null; } diff --git a/src/front/Components/Layouts/LoginCallback/index.tsx b/src/front/Components/Layouts/LoginCallback/index.tsx index 1f1714da..ea9c09ad 100644 --- a/src/front/Components/Layouts/LoginCallback/index.tsx +++ b/src/front/Components/Layouts/LoginCallback/index.tsx @@ -1,27 +1,28 @@ -import classes from "./classes.module.scss"; -import LandingImage from "../Login/landing-connect.png"; -import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage"; -import Router, { useRouter } from "next/router"; +// import classes from "./classes.module.scss"; +// import LandingImage from "../Login/landing-connect.png"; +// import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage"; +import { useRouter } from "next/router"; import React from "react"; -import Loader from "@Front/Components/DesignSystem/Loader"; +//import Loader from "@Front/Components/DesignSystem/Loader"; import Auth from "@Front/Api/Auth/IdNot"; +import Folder from "../Folder"; type IPropsClass = {}; -type IStateClass = {}; +//type IStateClass = {}; -class LoginCallBackClass extends React.Component { - public override render(): JSX.Element { - return ( - -
- -
-
- ); - } -} +// class LoginCallBackClass extends React.Component { +// public override render(): JSX.Element { +// return ( +// +//
+// +//
+//
+// ); +// } +// } // TODO: Refacto with functionnal component container of classcomponent export default function LoginCallBack(props: IPropsClass) { @@ -31,15 +32,13 @@ export default function LoginCallBack(props: IPropsClass) { const getIdNotJwt = async () => { try { const authService = Auth.getInstance(); - const user = await authService.getIdnotJwt(code); - console.log(user); - Router.push('/dossier'); + await authService.getIdnotJwt(code); } catch (error) { console.error(error); - Router.push('/login'); + // Router.push('/login'); } }; getIdNotJwt(); } - return ; + return ; } \ No newline at end of file