mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Factors redux tools to access the DB
This commit is contained in:
@@ -3,7 +3,7 @@ import { toast } from "react-toastify"
|
||||
|
||||
import { AppDispatch } from "../../store"
|
||||
|
||||
import { sendAddEnvie } from "../../store/envieAdd"
|
||||
import { fetchEnvieAdd } from "../../store/envieAdd"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
interface Props {
|
||||
@@ -29,7 +29,7 @@ const AddEnvie = ({ dispatch }: Props) => {
|
||||
const onSavePostClicked = () => {
|
||||
if (domaine && envies) {
|
||||
dispatch(
|
||||
sendAddEnvie({
|
||||
fetchEnvieAdd({
|
||||
domaine,
|
||||
envies,
|
||||
precisions,
|
||||
|
@@ -3,7 +3,7 @@ import { toast } from "react-toastify"
|
||||
|
||||
import { AppDispatch } from "../../store"
|
||||
|
||||
import { sendMembreSet } from "../../store/membreSet"
|
||||
import { fetchMembreSet } from "../../store/membreSet"
|
||||
import { Membre } from "../../services/membres"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
@@ -24,7 +24,7 @@ const MembreSet = ({ dispatch, membre }: Props) => {
|
||||
const onSavePostClicked = () => {
|
||||
if (prenom && nom) {
|
||||
dispatch(
|
||||
sendMembreSet({
|
||||
fetchMembreSet({
|
||||
...membre,
|
||||
prenom,
|
||||
nom,
|
||||
|
Reference in New Issue
Block a user