Skip to content

Commit

Permalink
fix(email-sender): change mail adresse for sender
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Jun 28, 2024
1 parent c6e2640 commit 3d51111
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/api/send-mail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function EmailSender({ contribution, refetch }: EmailSenderProps) {

const dataForBrevo = {
sender: {
email: "mihoub.debache@enseignementsup.gouv.fr",
email: "scanr@recherche.gouv.fr",
name: `${selectedProfile} de l'équipe scanR`,
},
to: [
Expand Down
1 change: 1 addition & 0 deletions src/components/edit-modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ const EditModal: React.FC<EditModalProps> = ({
sessionStorage.setItem("selectedProfile", profile);
setShowProfileModal(false);
};

return (
<>
<Modal isOpen={isOpen} hide={onClose}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import React, { createContext, useState, useContext } from "react";

// Définition du type de contexte
interface DataListContextType {
dataList: any[]; // Type de dataList à ajuster selon votre structure
dataList: any[];
setDataList: React.Dispatch<React.SetStateAction<any[]>>;
}

// Création du contexte avec une valeur par défaut
const DataListContext = createContext<DataListContextType>({
dataList: [],
setDataList: () => {},
});

// Composant Provider pour le contexte
export const DataListProvider: React.FC<{ children: React.ReactNode }> = ({
children,
}) => {
const [dataList, setDataList] = useState<any[]>([]); // Initialisation de dataList avec un tableau vide
const [dataList, setDataList] = useState<any[]>([]);

return (
<DataListContext.Provider value={{ dataList, setDataList }}>
Expand All @@ -25,7 +22,6 @@ export const DataListProvider: React.FC<{ children: React.ReactNode }> = ({
);
};

// Hook personnalisé pour utiliser le contexte
export const useDataList = () => {
return useContext(DataListContext);
};

0 comments on commit 3d51111

Please sign in to comment.