Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV][Playground] remove switch case in ToastManager return #2009

Closed
wants to merge 6 commits into from

Conversation

arthur-lemeur
Copy link
Collaborator

No description provided.

@arthur-lemeur arthur-lemeur self-assigned this Sep 26, 2023
displaySystemNotification={false}
/>;
default:
return (<></>);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, you change the logic of the component. If toastType is undefined for example the component will be render with <></> (empty jsx tag) but in your change, you return undefined and not a jsx tag

);
default:
return <></>;
}
}
return undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not return undefined but an empty jsx tag

@socket-security
Copy link

socket-security bot commented Oct 2, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@radix-ui/react-dialog 1.0.5 None +21 686 kB benoitgrelard
@radix-ui/react-toast 1.1.5 None +14 578 kB benoitgrelard
@radix-ui/colors 3.0.0-rc.5 None +0 631 kB vladmoroz

@panaC panaC changed the title remove switch case in ToastManager return [DEV][Playground] remove switch case in ToastManager return Oct 25, 2023
@danielweck danielweck closed this Apr 25, 2024
@danielweck danielweck deleted the arthur/ui/toasts branch April 25, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants