datavisyn / visyn_core

BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

fix: add null check for the user #474

Closed dv-usama-ansari closed 1 month ago

dv-usama-ansari commented 1 month ago

Closes #473

Developer Checklist (Definition of Done)

Issue

UI/UX/Vis

Code

PR

Summary of changes

Screenshots

Additional notes for the reviewer(s)

puehringer commented 1 month ago

@dv-usama-ansari @thinkh Why don't we add the check where we use it (so the interface remains correct, i.e. not null): https://github.com/datavisyn/visyn_core/blob/d917ce2e19144a074f554d0f4871d6af8a636c2c/src/app/header/VisynHeader.tsx#L98

I.e. just check user && user.name and render the menu?

thinkh commented 1 month ago

@puehringer Good suggestion. Let's keep things simple and do it like this. 👍