mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-09 00:54:21 +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";
|
@import "../../theme/mixins";
|
||||||
|
|
||||||
.boardPage {
|
.pageWrapper {
|
||||||
@include page-wrapper-center;
|
@include page-wrapper-center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boardContent {
|
.pageContent {
|
||||||
@include page-content-wrapper(800px);
|
@include page-content-wrapper(800px);
|
||||||
}
|
}
|
@ -6,9 +6,9 @@ import { AppThunk } from "../../store"
|
|||||||
import { fetchVolunteerDayWishesSetIfNeed } from "../../store/volunteerDayWishesSet"
|
import { fetchVolunteerDayWishesSetIfNeed } from "../../store/volunteerDayWishesSet"
|
||||||
import { selectUserJwtToken } from "../../store/auth"
|
import { selectUserJwtToken } from "../../store/auth"
|
||||||
import DDayInformations from "../../components/VolunteerBoard/DDayInformations/DDaysInformations"
|
import DDayInformations from "../../components/VolunteerBoard/DDayInformations/DDaysInformations"
|
||||||
import styles from "./styles.module.scss"
|
|
||||||
import DayWishes from "../../components/VolunteerBoard/DayWishes/DayWishes"
|
import DayWishes from "../../components/VolunteerBoard/DayWishes/DayWishes"
|
||||||
import DayWishesFormModal from "../../components/VolunteerBoard/DayWishesForm/DayWishesFormModal"
|
import DayWishesFormModal from "../../components/VolunteerBoard/DayWishesForm/DayWishesFormModal"
|
||||||
|
import Page from "../../components/Page/Page"
|
||||||
|
|
||||||
export type Props = RouteComponentProps
|
export type Props = RouteComponentProps
|
||||||
|
|
||||||
@ -18,13 +18,11 @@ const BoardPage: FC<Props> = (): JSX.Element => {
|
|||||||
if (jwtToken === undefined) return <p>Loading...</p>
|
if (jwtToken === undefined) return <p>Loading...</p>
|
||||||
if (jwtToken) {
|
if (jwtToken) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.boardPage}>
|
<Page>
|
||||||
<div className={styles.boardContent}>
|
|
||||||
<DayWishes />
|
<DayWishes />
|
||||||
<DayWishesFormModal />
|
<DayWishesFormModal />
|
||||||
<DDayInformations />
|
<DDayInformations />
|
||||||
</div>
|
</Page>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return <div>Besoin d'être identifié</div>
|
return <div>Besoin d'être identifié</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user