diff --git a/src/components/contact/ContactForm.js b/src/components/contact/ContactForm.js index 5d72576..66003fa 100644 --- a/src/components/contact/ContactForm.js +++ b/src/components/contact/ContactForm.js @@ -36,8 +36,9 @@ export const ContactForm = ({ const [inputPhoneConfirmValue, setInputPhoneConfirmValue] = useState() const [isPhoneConfirmValid, setPhoneConfirmValid] = useState() const [isPhoneConfirmMatch, setPhoneConfirmMatch] = useState() - const [showWhatsappRedirectMessage, setShowWhatsappRedirectMessage] = useState(false) - + const [showWhatsappRedirectMessage, setShowWhatsappRedirectMessage] = + useState(false) + const source = StorageUtils.getInLocalStorage(STORAGE_SOURCE) const requiredField =

{Form.required}

const dptCode = StorageUtils.getInLocalStorage( @@ -46,7 +47,9 @@ export const ContactForm = ({ const dptLibelle = StorageUtils.getInLocalStorage( STORAGE_TEST_DEMOGRAPHIC_DPT_LIBELLE ) - const activationContact = JSON.parse(StorageUtils.getInLocalStorage(STORAGE_ACTIVATION_CONTACT)) + const activationContact = JSON.parse( + StorageUtils.getInLocalStorage(STORAGE_ACTIVATION_CONTACT) + ) const cancel = () => { router.back() @@ -65,7 +68,10 @@ export const ContactForm = ({ client: client, onCompleted: () => { ContactUtils.saveContactRequest(contactType, sendContactQuery) - if(contactType === RequestContact.type.whatsapp && activationContact?.whatsapp_redirect_message?.length > 0) { + if ( + contactType === RequestContact.type.whatsapp && + activationContact?.whatsapp_redirect_message?.length > 0 + ) { setShowWhatsappRedirectMessage(true) } else { goToConfirmation() @@ -217,7 +223,12 @@ export const ContactForm = ({ return ( <> - + Information @@ -229,13 +240,16 @@ export const ContactForm = ({ - diff --git a/src/components/results/ContactTile.js b/src/components/results/ContactTile.js index 81e1102..8237b2c 100644 --- a/src/components/results/ContactTile.js +++ b/src/components/results/ContactTile.js @@ -7,9 +7,7 @@ import { import { client, GET_ACTIVATION_TILE_STATUS } from "../../../apollo-client" import { Icon } from "@dataesr/react-dsfr" import { useQuery } from "@apollo/client" -import { - STORAGE_ACTIVATION_CONTACT, -} from "../../constants/constants" +import { STORAGE_ACTIVATION_CONTACT } from "../../constants/constants" export const Tile = ({ title, @@ -60,7 +58,10 @@ export function ContactTile({ isArticle }) { if (loading) return <> if (error) return

Error

const isTileContactActive = data.activationTile.activation_tile - localStorage.setItem(STORAGE_ACTIVATION_CONTACT, JSON.stringify(data.activationTile)) + localStorage.setItem( + STORAGE_ACTIVATION_CONTACT, + JSON.stringify(data.activationTile) + ) return ( <>