MCPcopy
hub / github.com/genlayerlabs/genlayer-project-boilerplate / error

Function error

frontend/lib/utils/toast.ts:35–47  ·  view source on GitHub ↗
(message: string, options?: ExternalToast)

Source from the content-addressed store, hash-verified

33
34// Error toast with destructive colors (matching text-destructive)
35export const error = (message: string, options?: ExternalToast) => {
36 return sonnerToast.error(message, {
37 ...defaultOptions,
38 duration: 6000, // Longer for errors
39 style: {
40 background: 'hsl(var(--background))',
41 border: '1px solid hsl(var(--destructive) / 0.5)',
42 color: 'hsl(var(--destructive))',
43 ...options?.style,
44 },
45 ...options,
46 });
47};
48
49// Warning toast with yellow colors (matching text-yellow-400)
50export const warning = (message: string, options?: ExternalToast) => {

Callers 8

handleResolveFunction · 0.90
handleCopyFunction · 0.90
handleConnectFunction · 0.90
handleSwitchAccountFunction · 0.90
handleSubmitFunction · 0.90
WalletProviderFunction · 0.90
useCreateBetFunction · 0.90
useResolveBetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected