MCPcopy
hub / github.com/FlowiseAI/Flowise / showSnackbar

Function showSnackbar

packages/ui/src/views/tools/CustomMcpServerDialog.jsx:525–539  ·  view source on GitHub ↗
(message, variant = 'success')

Source from the content-addressed store, hash-verified

523 }, [dialogProps])
524
525 const showSnackbar = (message, variant = 'success') => {
526 enqueueSnackbar({
527 message,
528 options: {
529 key: new Date().getTime() + Math.random(),
530 variant,
531 action: (key) => (
532 <Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}>
533 <IconX />
534 </Button>
535 ),
536 ...(variant === 'error' && { persist: true })
537 }
538 })
539 }
540
541 const getErrorMsg = (error) =>
542 typeof error.response?.data === 'object' ? error.response.data.message : error.response?.data || error.message

Callers 4

addNewServerFunction · 0.85
saveServerFunction · 0.85
authorizeServerFunction · 0.85
deleteServerFunction · 0.85

Calls 3

enqueueSnackbarFunction · 0.90
closeSnackbarFunction · 0.90
getTimeMethod · 0.45

Tested by

no test coverage detected