mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 08:34:20 +02:00
create Page component
This commit is contained in:
parent
c2f4946da0
commit
b842174ebe
14
src/components/Page/Page.tsx
Normal file
14
src/components/Page/Page.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import React, { FC } from "react"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const Page: FC<Props> = ({ children }): JSX.Element => (
|
||||
<div className={styles.pageWrapper}>
|
||||
<div className={styles.pageContent}>{children}</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
export default Page
|
@ -1,9 +1,9 @@
|
||||
@import "../../theme/mixins";
|
||||
|
||||
.boardPage {
|
||||
.pageWrapper {
|
||||
@include page-wrapper-center;
|
||||
}
|
||||
|
||||
.boardContent {
|
||||
.pageContent {
|
||||
@include page-content-wrapper(800px);
|
||||
}
|
@ -6,9 +6,9 @@ import { AppThunk } from "../../store"
|
||||
import { fetchVolunteerDayWishesSetIfNeed } from "../../store/volunteerDayWishesSet"
|
||||
import { selectUserJwtToken } from "../../store/auth"
|
||||
import DDayInformations from "../../components/VolunteerBoard/DDayInformations/DDaysInformations"
|
||||
import styles from "./styles.module.scss"
|
||||
import DayWishes from "../../components/VolunteerBoard/DayWishes/DayWishes"
|
||||
import DayWishesFormModal from "../../components/VolunteerBoard/DayWishesForm/DayWishesFormModal"
|
||||
import Page from "../../components/Page/Page"
|
||||
|
||||
export type Props = RouteComponentProps
|
||||
|
||||
@ -18,13 +18,11 @@ const BoardPage: FC<Props> = (): JSX.Element => {
|
||||
if (jwtToken === undefined) return <p>Loading...</p>
|
||||
if (jwtToken) {
|
||||
return (
|
||||
<div className={styles.boardPage}>
|
||||
<div className={styles.boardContent}>
|
||||
<DayWishes />
|
||||
<DayWishesFormModal />
|
||||
<DDayInformations />
|
||||
</div>
|
||||
</div>
|
||||
<Page>
|
||||
<DayWishes />
|
||||
<DayWishesFormModal />
|
||||
<DDayInformations />
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
return <div>Besoin d'être identifié</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user