Repository navigation
refactor: Load users from the API - #1218
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1218 +/- ##
==========================================
+ Coverage 65.45% 65.67% +0.21%
==========================================
Files 268 269 +1
Lines 17029 17338 +309
Branches 162 164 +2
==========================================
+ Hits 11147 11386 +239
- Misses 4710 4764 +54
- Partials 1172 1188 +16
Continue to review full report at Codecov.
|
|
|
||
| if (!users) { | ||
| return <FullScreenLoader /> | ||
| } |
There was a problem hiding this comment.
We avoid early return on the frontend (it's a newish decision)
There was a problem hiding this comment.
I'm not sure what early return means... but in case there are no users, during the initial load, what should we do instead?
There was a problem hiding this comment.
Sorry, your content is fine, I just mean please use else to connect the conditions.
There was a problem hiding this comment.
Ahh, ok. I will do that but I'm curious about the reason.
There was a problem hiding this comment.
Sure - the idea is that using else makes it clear that the line of code you're reading is only executed conditionally. Without else, the fact that the line is conditional is only represented by an apparently unrelated if that happens to contain return. So it's easier to misunderstand when maintaining the code.
|
@Emyrk just confirming there's no pager |
|
@presleyp we removed the pagination on the backend for now. Here is the discussion: https://codercom.slack.com/archives/C01A9SEKFEE/p1651240046986249 |
Closes #1216