added toust and cleaned code
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
export default function ShowError({ message }: { message: string }) {
|
||||
useEffect(() => {
|
||||
if (message) {
|
||||
toast.error(message);
|
||||
}
|
||||
}, [message]);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user