-
+
S'informer sur le bénévolat
diff --git a/src/pages/Home/styles.module.scss b/src/pages/Home/styles.module.scss
index 0cab755..1a9bfda 100755
--- a/src/pages/Home/styles.module.scss
+++ b/src/pages/Home/styles.module.scss
@@ -15,3 +15,9 @@
.preRegisterContent {
@include page-content-wrapper;
}
+
+.navigationLink {
+ @include page-content-wrapper;
+
+ text-align: center;
+}
diff --git a/src/server/gsheets/volunteers.ts b/src/server/gsheets/volunteers.ts
index 159498d..7a183f5 100644
--- a/src/server/gsheets/volunteers.ts
+++ b/src/server/gsheets/volunteers.ts
@@ -83,7 +83,7 @@ export const volunteerForgot = expressAccessor.set(
return {
toDatabase: newVolunteer,
toCaller: {
- message: `Un nouveau mot de passe t'a été envoyé par email. Regarde bien dans tes spams, ils pourrait y être :/`,
+ message: `Un nouveau mot de passe t'a été envoyé par email. Regarde bien dans les spams, il pourrait y être :/`,
},
}
}
diff --git a/src/server/ssr.tsx b/src/server/ssr.tsx
index fbc87a9..c0395c1 100644
--- a/src/server/ssr.tsx
+++ b/src/server/ssr.tsx
@@ -22,7 +22,7 @@ export default async (req: Request, res: Response, next: NextFunction): Promise<
const loadBranchData = (): Promise
=> {
const branch = matchRoutes(routes, req.path)
const promises = branch.map(({ route, match }) => {
- if (route.loadData)
+ if (route.loadData) {
return Promise.all(
route
.loadData({
@@ -33,6 +33,7 @@ export default async (req: Request, res: Response, next: NextFunction): Promise<
})
.map((item: Action) => store.dispatch(item))
)
+ }
return Promise.resolve(null)
})
diff --git a/src/store/utils.ts b/src/store/utils.ts
index 9ee4032..ed19b4f 100644
--- a/src/store/utils.ts
+++ b/src/store/utils.ts
@@ -1,7 +1,12 @@
-import { ActionCreatorWithoutPayload, ActionCreatorWithPayload } from "@reduxjs/toolkit"
+import {
+ Action,
+ ActionCreatorWithoutPayload,
+ ActionCreatorWithPayload,
+ ThunkDispatch,
+} from "@reduxjs/toolkit"
import { toast } from "react-toastify"
-import { AppThunk, AppDispatch } from "."
+import { AppState, AppThunk } from "."
export interface StateRequest {
readyStatus: "idle" | "request" | "success" | "failure"
@@ -41,10 +46,10 @@ export function elementFetch>(
getSuccess: ActionCreatorWithPayload,
getFailure: ActionCreatorWithPayload,
errorMessage?: (error: Error) => void,
- successMessage?: (data: Element, dispatch: AppDispatch) => void
+ successMessage?: (data: Element, dispatch: ThunkDispatch) => void
): (...idArgs: ServiceInput) => AppThunk {
return (...idArgs: ServiceInput): AppThunk =>
- async (dispatch) => {
+ async (dispatch: ThunkDispatch) => {
dispatch(getRequesting())
const { error, data } = await elementService(...idArgs)
diff --git a/src/store/volunteerNotifsSet.ts b/src/store/volunteerNotifsSet.ts
index 09ea239..3b50836 100644
--- a/src/store/volunteerNotifsSet.ts
+++ b/src/store/volunteerNotifsSet.ts
@@ -40,13 +40,14 @@ export const fetchVolunteerNotifsSet = elementFetch(
)
const shouldFetchVolunteerNotifsSet = (state: AppState, id: number) =>
- state.volunteerNotifsSet.readyStatus !== "success" ||
- (state.volunteerNotifsSet.entity && state.volunteerNotifsSet.entity.id !== id)
+ state.volunteerNotifsSet?.readyStatus !== "success" ||
+ (state.volunteerNotifsSet?.entity && state.volunteerNotifsSet?.entity?.id !== id)
export const fetchVolunteerNotifsSetIfNeed =
(id = 0, notif: Partial = {}): AppThunk =>
(dispatch, getState) => {
let jwt = ""
+
if (!id) {
;({ id, jwt } = getState().auth)
}
diff --git a/webpack/base.config.ts b/webpack/base.config.ts
index a7962ba..a86a6e8 100644
--- a/webpack/base.config.ts
+++ b/webpack/base.config.ts
@@ -83,7 +83,7 @@ const config = (isWeb = false): Configuration => ({
minimizer: [
new TerserPlugin({
// See more options: https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
- terserOptions: { compress: { drop_console: true } },
+ terserOptions: { compress: { drop_console: false } },
}),
],
},