Skip to content

Commit

Permalink
Lbac 1649 fix footer (#820)
Browse files Browse the repository at this point in the history
* fix: suppression de l'ancien footer dans les pages

* fix: ajout des footers

* fix: revert emails

* fix: revert logs
  • Loading branch information
remy-auricoste authored Nov 20, 2023
1 parent cf70449 commit b365394
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 157 deletions.
39 changes: 0 additions & 39 deletions ui/components/espace_pro/Layout/Footer.tsx

This file was deleted.

66 changes: 0 additions & 66 deletions ui/components/espace_pro/Layout/Logo.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions ui/components/espace_pro/Layout/Mission.tsx

This file was deleted.

33 changes: 19 additions & 14 deletions ui/components/espace_pro/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Box, Container, Divider, Flex, Spacer } from "@chakra-ui/react"
import { Container, Flex } from "@chakra-ui/react"

import Footer from "@/components/footer"

import Footer from "./Footer"
import Header from "./Header"
import Mission from "./Mission"
import NavigationMenu from "./NavigationMenu"

/**
Expand All @@ -13,7 +13,21 @@ import NavigationMenu from "./NavigationMenu"
* @param {boolean} displayNavigationMenu
* @return {JSX.Element}
*/
export default function Layout({ header = true, children, widget = false, footer = true, rdva = false, displayNavigationMenu = true }) {
export default function Layout({
header = true,
children,
widget = false,
footer = true,
rdva = false,
displayNavigationMenu = true,
}: {
children: React.ReactNode
header?: boolean
widget?: boolean
footer?: boolean
rdva?: boolean
displayNavigationMenu?: boolean
}) {
return (
<Container maxW="full" p="0">
<Flex direction="column" h="100vh">
Expand All @@ -26,16 +40,7 @@ export default function Layout({ header = true, children, widget = false, footer
<Container maxW="container.xl" flexGrow="1">
{children}
</Container>
{!widget && footer && (
<>
<Box>
<Spacer />
<Mission />
<Divider />
<Footer />
</Box>
</>
)}
{!widget && footer && <Footer />}
</Flex>
</Container>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"

import Layout from "../../Layout"

export const DepotSimplifieLayout = ({ children }: { children: React.ReactNode }) => {
return (
<Layout header={false} displayNavigationMenu={false}>
{children}
</Layout>
)
}
2 changes: 1 addition & 1 deletion ui/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { publicConfig } from "../config.public"

const Footer = () => {
return (
<Box as="footer" borderTop="1px solid" borderTopColor="info" pt={6}>
<Box as="footer" borderTop="1px solid" borderTopColor="info" paddingTop={6} marginTop={12}>
<Box maxWidth="1350px" mx="auto" pl={{ base: 0, lg: 6 }}>
<Box as="nav" pl={{ base: 8, lg: 0 }}>
<Grid templateColumns={{ base: "1fr", lg: "repeat(4, 1fr)" }}>
Expand Down
8 changes: 7 additions & 1 deletion ui/pages/espace-pro/creation/detail.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { DepotSimplifieLayout } from "@/components/espace_pro/common/components/DepotSimplifieLayout"

import InformationCreationCompte from "../../../components/espace_pro/Authentification/InformationCreationCompte"

export default function CreationDetail() {
return <InformationCreationCompte />
return (
<DepotSimplifieLayout>
<InformationCreationCompte />
</DepotSimplifieLayout>
)
}
8 changes: 7 additions & 1 deletion ui/pages/espace-pro/creation/entreprise/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { DepotSimplifieLayout } from "@/components/espace_pro/common/components/DepotSimplifieLayout"

import { AUTHTYPE } from "../../../../common/contants"
import CreationCompte from "../../../../components/espace_pro/Authentification/CreationCompte"

export default function CreationEntreprise() {
return <CreationCompte type={AUTHTYPE.ENTREPRISE} widget={false} />
return (
<DepotSimplifieLayout>
<CreationCompte type={AUTHTYPE.ENTREPRISE} widget={false} />
</DepotSimplifieLayout>
)
}
8 changes: 5 additions & 3 deletions ui/pages/espace-pro/creation/offre.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { Box } from "@chakra-ui/react"
import { useRouter } from "next/router"

import { AjouterVoeux, AuthentificationLayout, Bandeau } from "../../../components/espace_pro"
import { DepotSimplifieLayout } from "@/components/espace_pro/common/components/DepotSimplifieLayout"

import { AjouterVoeux, Bandeau } from "../../../components/espace_pro"

export default function DepotRapideAjouterVoeux(props) {
const router = useRouter()
const { displayBanner } = router.query

return (
<AuthentificationLayout>
<DepotSimplifieLayout>
{displayBanner && (
<Bandeau
type="success"
Expand All @@ -19,6 +21,6 @@ export default function DepotRapideAjouterVoeux(props) {
<Box mt={10}>
<AjouterVoeux {...props} />
</Box>
</AuthentificationLayout>
</DepotSimplifieLayout>
)
}

0 comments on commit b365394

Please sign in to comment.