MCPcopy Create free account
hub / github.com/bsoc-bitbyte/busify / notify

Function notify

frontend/src/utils/notify.ts:3–30  ·  view source on GitHub ↗
(message: string, type: 'warn' | 'error' | 'success')

Source from the content-addressed store, hash-verified

1import toast from 'react-hot-toast';
2
3export const notify = (message: string, type: 'warn' | 'error' | 'success') => {
4 if (type === 'warn') {
5 toast(message, {
6 icon: '⚠️',
7 style: {
8 borderRadius: '10px',
9 background: '#FBBF24',
10 color: '#1F2937',
11 },
12 });
13 } else if (type === 'error') {
14 toast.error(message, {
15 style: {
16 borderRadius: '10px',
17 background: '#EF4444',
18 color: '#F3F4F6',
19 },
20 });
21 } else if (type === 'success') {
22 toast.success(message, {
23 style: {
24 borderRadius: '10px',
25 background: '#10B981',
26 color: '#F3F4F6',
27 },
28 });
29 }
30};

Callers 5

handleAddPassengerFunction · 0.90
bookTicketHandlerFunction · 0.90
BusDetailsFunction · 0.90
SubmitFunction · 0.90
displayRazorpayFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected