Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ryan/feat(ux: create input loading spinner) #399
ryan/feat(ux: create input loading spinner) #399
Changes from 41 commits
fe61aee
5d7fb40
86c9e36
f69924e
ba83fee
879e45d
0642af5
9fe6c06
cfbb118
91a1cad
3ae4268
8555c8c
d1ea90e
0a97191
0a17029
ddf61e9
b13771f
7405e32
f951b9f
896684d
ada9f2a
f4f6297
10d8372
6750360
6e05eee
a5ff75e
c57250a
a09b347
3691ac6
2fcd56a
f8159f1
5bbb240
045fea2
6a45440
efbf890
4b7be56
dd0f185
bbce891
42f4023
0803b5a
1a86fce
68f5ac5
edf7ccb
585c807
564e8c4
cd6711d
6beef05
a81040b
f910e60
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Does this not return an error in your local machine? I tried using this syntax for my loadingSpinner test, but it kept returning an error for me.
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.
@choir27 it does; and it did before. I just haven't been able to get back to this one :P
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.
@choir27 fixed
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.
Your tests seem to be failing, please look into this and make sure it's changing the loading state properly
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.
@choir27 I was aware :P Just been busy working on other things and unable to get back to this. TY!
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.
@choir27 fixed
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.
Instead of setting setIsLoading(false) after the API or error, use
finally
. Then you'd only have to set it once.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.
Ahh so smart, thank you! This will be updated.
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.
Updated in latest commit.
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.
@shashilo pinging you for a reminder, please advise.
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.
Could you please explain why
setIsLoading(false)
is used twice? One in thetry
part and in thecatch
.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.
@vmaineng this was from @Clue355's branch of this branch that was approved and merged in.
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.
Though I'd like to make this as similar to my code on the login page as possible.
@shashilo @Clue355 @vmaineng @chris-nowicki thoughts on me changing the
onSubmit
on theregister/page.tsx
to be inline with the one on thelogin/page.tsx
?Current Login
onSubmit
Current Register
onSubmit
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.
@shashilo @Clue355 @vmaineng @chris-nowicki Please advise on the comment above.
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.
@ryandotfurrer in what ways to you plan to make it inline? by adding a finally to the register try/catch?
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.
@chris-nowicki precisely. Just to make them consistent. @vmaineng
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.
Use finally. It allows you to only call the setIsLoading false once.
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.
@shashilo added in the latest commit