Closed DhairyaBahl closed 2 years ago
@DhairyaBahl looking good. Please do run yarn style:fix
on this.
@DhairyaBahl looks like you've amended the PR, but I still see a lot of changes I wasn't expecting in App.tsx
.
@krancour It would be amazing if you can list out those changes. I will work on those asap.
@DhairyaBahl look at the diffs.
@krancour I think now it should be good to go. I've removed all the unwanted changes from App.tsx
. I am just filling data in LS onLogin and clearing data from LS on logout. Kindly review this.
@krancour Kindly review it again and tell me what more I can improve ? or is it ok ?
PS: I don't know why but I overcomplicated this PR badly. Will take care of that in future. 🙂
PS: I don't know why but I overcomplicated this PR badly. Will take care of that in future.
@DhairyaBahl I don't think it was that bad. I think the direction of the PR pivoted a few times based on our ongoing collaboration. That's to be expected.
We're landing in a good place. No worries!
And thank you for your patience.
@krancour I think now it is good to go. 🔥
And thank you for your patience.
Thanks to you kent. Thanks for not losing patience when I was make multiple commits with small changes. Other maintainers would have ignored this PR 😂.
This looks great now. The one last, small thing I might suggest is renaming UserLogin.ts
to maybe just User.ts
since the functionality within is not really coupled to the login process at all anymore, but simply a lazy fetch / cache for the user ID.
@krancour To be Honest ! I was using the name User.ts
earlier but then linter started giving me some errors. It got confused between the User.ts and User.tsx. Kindly confirm this once.
Weird... I don't understand why the linter didn't like that. I will look as soon as I get a chance. This PR is great. Thank you for all the hard work!
@krancour Kindly review this one and Merge this if everything if ok so that I can work on other PRs which are dependent on this one. 😄
/brig run
@DhairyaBahl I see what the problem was with User.ts
. Since there was also a User.tsx
, import statements like import User from "./User"
became ambiguous.
I amended this PR with a commit that moves getUserID()
into the same file as getClient()
and renames it to UItils.ts
.
fwiw, I usually consider anything named "utils" to be a "smell" that says, "I just didn't know where else to put this." But this seems like an ok short-term solution.
/brig run
/brig run
/brig run
/brig run
@DhairyaBahl I see what the problem was with
User.ts
. Since there was also aUser.tsx
, import statements likeimport User from "./User"
became ambiguous.I amended this PR with a commit that moves
getUserID()
into the same file asgetClient()
and renames it toUItils.ts
.fwiw, I usually consider anything named "utils" to be a "smell" that says, "I just didn't know where else to put this." But this seems like an ok short-term solution.
Ohh ! I see ! Understood.
@krancour I can see you are facing some problems with this PR. Is there anything I can help you with ?
/brig run
Thanks for all the hard work on this @DhairyaBahl
Thanks for all the hard work on this @DhairyaBahl
It was great experience to collaborate with you on this PR. 😄
Fixes #17.
Get/store user ID at log in.