From 309bef05cdc9513a51911e14fbb9098dd26efe3d Mon Sep 17 00:00:00 2001 From: RizqiSyahrendra Date: Fri, 25 Apr 2025 01:46:48 +0700 Subject: [PATCH 1/2] fix: form submission toast success and error --- package.json | 1 + src/app/(main)/layout.tsx | 4 +- src/components/blocks/Form/index.tsx | 72 ++++++++++++++++------------ yarn.lock | 13 +++++ 4 files changed, 58 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 2fc68ab..d6e273d 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "react-dom": "^19.0.0", "react-hook-form": "^7.56.1", "react-select": "^5.10.1", + "react-toastify": "^11.0.5", "swiper": "^11.2.6" }, "devDependencies": { diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index 0592a8a..057ca7e 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -6,6 +6,7 @@ import { getDefaultMetadata } from "@/utils/metadata"; import Header from "@/components/layouts/Header"; import Footer from "@/components/layouts/Footer"; import Image from "next/image"; +import { ToastContainer } from "react-toastify"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -86,7 +87,8 @@ export default function RootLayout({