Closed nsunami closed 4 months ago
Update: Now I get
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'supporting')
I suspect that the redirect may not be working well.
I wonder if we can regard this Onboarding quest issue as a different issue or not.
Ah yes - thanks for trying to fix this 🙏
The currentUser
is indeed potentially not available when people directly go to the /dashboard
route (previously d is null
or similar). What we could do, is wrap the OnboardingQuests in a conditional render only when currentUser
is not null. This would be in addition to your already proposed changes.
It would look something like this:
return (
<>{currentUser &&
<>
<OnboardingQuest1 />
</>}
</>
)
I suspect this will fix both our problems, but I would encourage a bit of testing and trying to break it 😊
This pull request is stale because it has been open for 2 days with no activity.
@chartgerink thanks! I adopted your suggestion. I tried logging in and out while on /dashboard multiple times, and I no longer get an error.
Could you check?
This pull request is stale because it has been open for 2 days with no activity.
@nsunami thanks for the updates and patience - I was out on vacation 🌴
I think this is sufficient for now - I do get a bit of a flashy screen that I would personally consider problematic for production in general. 👇 (it's worse than this at times)
https://github.com/user-attachments/assets/e4eb5639-1049-4f70-a6b3-97fa5d309349
However, given that we are working towards a v2 and this is such a specific case, I think this is acceptable in the scenario of keeping the current version functional until v2 launches.
This is my attempt to fix the 400 error on the dashboard page. As reported in #2101, the dashboard page was throwing a 400 error. The error message varied from
d is null
toCannot read properties of null (reading "firstName")
.When looking at the Dashboard page, I noticed that the workspace information is expected to be non-null, by non-null assertion by bang (!):
I assume this means that when the currentWorkspace object is indeed null (when logging out), it will throw an error. I changed this part of the code to allow nullish values:
Other line changes are due to code formatting.
@chartgerink : Could you check logging in and out several times to see if you get a 400 error on your side?