mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 08:34:20 +02:00
remove /dayWishes page
This commit is contained in:
parent
7a4d609382
commit
c04b62a657
@ -1,34 +0,0 @@
|
||||
import { FC, memo } from "react"
|
||||
import { RouteComponentProps } from "react-router-dom"
|
||||
import { useSelector } from "react-redux"
|
||||
|
||||
import { AppThunk } from "../../store"
|
||||
import { fetchVolunteerDayWishesSetIfNeed } from "../../store/volunteerDayWishesSet"
|
||||
import { selectUserJwtToken } from "../../store/auth"
|
||||
import DayWishesForm from "../../components/VolunteerBoard/DayWishesForm/DayWishesForm"
|
||||
import DDayInformations from "../../components/VolunteerBoard/ParticipationDetailsForm/ParticipationDetailsForm"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
export type Props = RouteComponentProps
|
||||
|
||||
const HomePage: FC<Props> = (): JSX.Element => {
|
||||
const jwtToken = useSelector(selectUserJwtToken)
|
||||
|
||||
if (jwtToken === undefined) return <p>Loading...</p>
|
||||
if (jwtToken) {
|
||||
return (
|
||||
<div className={styles.dayWishPage}>
|
||||
<div className={styles.dayWishContent}>
|
||||
<DayWishesForm />
|
||||
<DDayInformations />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return <div>Besoin d'être identifié</div>
|
||||
}
|
||||
|
||||
// Fetch server-side data here
|
||||
export const loadData = (): AppThunk[] => [fetchVolunteerDayWishesSetIfNeed()]
|
||||
|
||||
export default memo(HomePage)
|
@ -1,16 +0,0 @@
|
||||
import loadable from "@loadable/component"
|
||||
|
||||
import { Loading, ErrorBoundary } from "../../components"
|
||||
import { Props, loadData } from "./DayWishes"
|
||||
|
||||
const HomePage = loadable(() => import("./DayWishes"), {
|
||||
fallback: <Loading />,
|
||||
})
|
||||
|
||||
export default (props: Props): JSX.Element => (
|
||||
<ErrorBoundary>
|
||||
<HomePage {...props} />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
|
||||
export { loadData }
|
@ -1,9 +0,0 @@
|
||||
@import "../../theme/mixins";
|
||||
|
||||
.dayWishPage {
|
||||
@include page-wrapper-center;
|
||||
}
|
||||
|
||||
.dayWishContent {
|
||||
@include page-content-wrapper(800px);
|
||||
}
|
@ -6,7 +6,6 @@ import AsyncAnnouncements, { loadData as loadAnnouncementsData } from "../pages/
|
||||
import AsyncPreRegisterPage, { loadData as loadPreRegisterPage } from "../pages/PreRegister"
|
||||
import AsyncTeams, { loadData as loadTeamsData } from "../pages/Teams"
|
||||
import AsyncBoard, { loadData as loadBoardData } from "../pages/Board"
|
||||
import AsyncDayWishes, { loadData as loadDayWishesData } from "../pages/DayWishes"
|
||||
import AsyncWish, { loadData as loadWishData } from "../pages/Wish"
|
||||
import AsyncVolunteerPage, { loadData as loadVolunteerPageData } from "../pages/VolunteerPage"
|
||||
import Login from "../pages/Login"
|
||||
@ -51,11 +50,6 @@ export default [
|
||||
component: AsyncTeams,
|
||||
loadData: loadTeamsData,
|
||||
},
|
||||
{
|
||||
path: "/dayWishes",
|
||||
component: AsyncDayWishes,
|
||||
loadData: loadDayWishesData,
|
||||
},
|
||||
{
|
||||
path: "/wish",
|
||||
component: AsyncWish,
|
||||
|
Loading…
x
Reference in New Issue
Block a user