From f4b702770841caba8e68dccb3cf765b24eb0ac2e Mon Sep 17 00:00:00 2001 From: Md Asif Date: Mon, 23 Dec 2024 23:57:52 +0530 Subject: [PATCH] refactor: replace inline notification rendering with Notification component in LockersRegistration --- src/pages/LockersRegistration.jsx | 34 ++----------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/pages/LockersRegistration.jsx b/src/pages/LockersRegistration.jsx index 703c423..afc274d 100644 --- a/src/pages/LockersRegistration.jsx +++ b/src/pages/LockersRegistration.jsx @@ -5,10 +5,9 @@ import FormBox from "../components/FormBox"; import Button from "../components/Button"; import { useToast } from "../hooks/useToast"; import { lockerService } from "../services/locker.service"; -import { Copy } from "lucide-react"; import { AnimatePresence } from "motion/react"; -import { motion } from "motion/react"; import { useLoading } from "../hooks/useLoading"; +import Notification from "../components/Notification"; function LockersRegistration() { const location = useLocation(); @@ -208,36 +207,7 @@ function LockersRegistration() { return (
- {notification.visible && ( - - {notification.type === "error" ? notification.message : notification.message.split(":").map((msg, index) => { - return index === 1 ? ( - - {msg} - - ) : ( - {msg} - ); - })} - - - )} + {notification.visible && }
{notification.type === "success" && (