-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix(web): revert functionality to remember last workspace opened #523
Conversation
✅ Deploy Preview for reearth-web canceled.
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
+ Coverage 26.66% 26.70% +0.03%
==========================================
Files 1337 1337
Lines 144689 144412 -277
Branches 3483 3481 -2
==========================================
- Hits 38579 38560 -19
+ Misses 104988 104730 -258
Partials 1122 1122
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
||
navigate(`/dashboard/${workspaceId}`); | ||
} else { | ||
setCurrentUserId(data?.me?.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function had two functionalities.
a. Handle redirect
b. Set user id if currentUserId !== data?.me?.id
This modification looks like losing b
, is it merely unnecessary code?
It might be necessary when switching accounts.
setLastWorkspace(currentWorkspace); | ||
navigate(`/dashboard/${workspaceId}`); | ||
} else { | ||
setCurrentUserId(data?.me?.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as other comment
Overview
We were getting an infinite loop on the Dashboard that was hurting the server (probably).
The logic around remembering the previous workspace was hard to understand and maintain, so I decided to remove that implementation so we can get Re:Earth back to a working condition and then reimplement that functionality later.