From 768ab368a682dc3ec4c067eefbaba0cf2890e853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Calcagno=20Lo=C3=AFc?= <98493858+CalcagnoLoic@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:42:14 +0200 Subject: [PATCH] modify toast + fix contact form --- public/assets/style/index.css | 4 ++++ src/components/Projects/ProfessionalProjects/index.tsx | 2 +- src/container/Form/index.tsx | 3 ++- src/utils/toastMessage/index.ts | 6 +++--- tailwind.config.js | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/public/assets/style/index.css b/public/assets/style/index.css index 57698f5..0106c00 100644 --- a/public/assets/style/index.css +++ b/public/assets/style/index.css @@ -6,6 +6,10 @@ --toastify-toast-width: 420px; } +html { + color-scheme: light; +} + @font-face { font-family: barlow; src: url("../fonts/Barlow/Barlow-Regular.ttf"); diff --git a/src/components/Projects/ProfessionalProjects/index.tsx b/src/components/Projects/ProfessionalProjects/index.tsx index 8373d08..1e31ce8 100644 --- a/src/components/Projects/ProfessionalProjects/index.tsx +++ b/src/components/Projects/ProfessionalProjects/index.tsx @@ -88,7 +88,7 @@ const Component = () => { onClick={() => handleMoreProject(setVisibleProject)} > - Load More... + Voir plus de projets... diff --git a/src/container/Form/index.tsx b/src/container/Form/index.tsx index 0b5b26e..4291b84 100644 --- a/src/container/Form/index.tsx +++ b/src/container/Form/index.tsx @@ -52,7 +52,8 @@ const Component = () => { setMessage(""); notify("success"); }) - .catch(() => { + .catch((error) => { + console.error("Error sending email:", error); notify("error"); }); }; diff --git a/src/utils/toastMessage/index.ts b/src/utils/toastMessage/index.ts index d86366e..26f09b2 100644 --- a/src/utils/toastMessage/index.ts +++ b/src/utils/toastMessage/index.ts @@ -4,14 +4,14 @@ import "react-toastify/dist/ReactToastify.css"; export const notify = (state: "success" | "error" | "missing") => { switch (state) { case "success": - toast.success("Mail send with succes!", { + toast.success("Email envoyé avec succès!", { position: "bottom-right", }); break; case "error": toast.error( - "Oops, there are an error with servor, try later or contact me by email.", + "Oops, une erreur est survenue sur le serveur. Réessayez plus tard ou contactez moi par mail directement.", { position: "bottom-right", }, @@ -19,7 +19,7 @@ export const notify = (state: "success" | "error" | "missing") => { break; case "missing": - toast.warn("You have probably forgotten to fill in some information ", { + toast.warn("Vous avez probablement oublié de remplir une information!", { position: "bottom-right", }); break; diff --git a/tailwind.config.js b/tailwind.config.js index cc2a1fa..98004ea 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,6 +1,7 @@ /** @type {import('tailwindcss').Config} */ export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], + darkMode: false, theme: { extend: { colors: {