This commit is contained in:
afkarxyz
2025-11-22 06:16:18 +07:00
parent 50ca20ce0f
commit 0c284ba62c
26 changed files with 1042 additions and 261 deletions
+31
View File
@@ -0,0 +1,31 @@
import { toast } from 'sonner';
import { playSuccessSound, playErrorSound, playWarningSound, playInfoSound } from './audio';
// Wrapper functions for toast with sound effects
export const toastWithSound = {
success: (message: string, data?: any) => {
playSuccessSound();
return toast.success(message, data);
},
error: (message: string, data?: any) => {
playErrorSound();
return toast.error(message, data);
},
warning: (message: string, data?: any) => {
playWarningSound();
return toast.warning(message, data);
},
info: (message: string, data?: any) => {
playInfoSound();
return toast.info(message, data);
},
// Default toast without specific type
message: (message: string, data?: any) => {
playInfoSound();
return toast(message, data);
},
};