Enhance Toastify notifications with custom icons and adjust autoClose timing
This commit is contained in:
@@ -164,18 +164,15 @@ export function LyricSearchInputField({ id, placeholder, setShowLyrics }) {
|
||||
|
||||
toast.update(toastId, {
|
||||
type: "success",
|
||||
render: `🦄 Found! (Took ${duration}s)`,
|
||||
type: "",
|
||||
render: `Found! (Took ${duration}s)`,
|
||||
className: "Toastify__toast--success",
|
||||
autoClose: 2000,
|
||||
hideProgressBar: true,
|
||||
autoClose: 2500,
|
||||
});
|
||||
} catch (error) {
|
||||
toast.update(toastId, {
|
||||
type: "error",
|
||||
render: `😕 ${error.message}`,
|
||||
autoClose: 5000,
|
||||
hideProgressBar: true,
|
||||
});
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
|
Reference in New Issue
Block a user