Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify toast + fix contact form #20

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions public/assets/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
--toastify-toast-width: 420px;
}

html {
color-scheme: light;
}

@font-face {
font-family: barlow;
src: url("../fonts/Barlow/Barlow-Regular.ttf");
Expand Down
2 changes: 1 addition & 1 deletion src/components/Projects/ProfessionalProjects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const Component = () => {
onClick={() => handleMoreProject(setVisibleProject)}
>
<span className="whitespace-pre-wrap text-center font-[bellefair] text-2xl font-medium leading-none tracking-tight text-gallery lg:text-lg dark:from-gallery dark:to-slate-900/10">
Load More...
Voir plus de projets...
</span>
</ShimmerButton>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/container/Form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const Component = () => {
setMessage("");
notify("success");
})
.catch(() => {
.catch((error) => {
console.error("Error sending email:", error);
notify("error");
});
};
Expand Down
6 changes: 3 additions & 3 deletions src/utils/toastMessage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ 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",
},
);
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;
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
darkMode: false,
theme: {
extend: {
colors: {
Expand Down