alerts: use shorthand return

This commit is contained in:
David Lechner
2022-11-22 15:56:56 -06:00
committed by David Lechner
parent 95199e44c1
commit 9fe62467d5
17 changed files with 109 additions and 140 deletions
+7 -9
View File
@@ -47,12 +47,10 @@ const CompilerError: React.VoidFunctionComponent<CompilerErrorProps> = ({ error
export const compilerError: CreateToast<CompilerErrorProps, 'dismiss' | 'gotoError'> = (
onAction,
props,
) => {
return {
message: <CompilerError {...props} />,
icon: 'error',
intent: Intent.DANGER,
timeout: 0,
onDismiss: () => onAction('dismiss'),
};
};
) => ({
message: <CompilerError {...props} />,
icon: 'error',
intent: Intent.DANGER,
timeout: 0,
onDismiss: () => onAction('dismiss'),
});