-
Notifications
You must be signed in to change notification settings - Fork 3
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
Table Component/Rankings Page #658
Conversation
TODOS:
|
Consider alternative to useEffect for query... maybe function called in useEffect first page render? then called on page/search? |
BOOM 💥 (I disagree with eslint my useEffect is good ) |
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.
great job! left comments about async/await preferences and moving the spinner into components/elements
should be good to merge after we address those, so just rerequest me for review after you make changes
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.
tested the new table bottom element and it looks great! left some comments regarding the return type / documentation of the getPageNumbers
function, but once that is addressed then this LGTM
@@ -20,6 +20,38 @@ const BattlecodeTableBottomElement: React.FC<TableBottomProps> = ({ | |||
const backDisabled = currentPage <= 1; | |||
const forwardDisabled = currentPage >= pageCount; | |||
|
|||
function getPageNumbers(): Array<string | number> { |
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 add a comment here describing what this function does and its the return value? I see it returns strings and numbers but i'm not sure what that means
.concat(["...", pageCount]); | ||
} | ||
} else if (pageCount < 1) { | ||
return ["1"]; |
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.
looks like we're returning a string containing 1 here instead of the number 1. is this intentional?
Co-authored-by: Serena Li <serena.li.usa@gmail.com>
Co-authored-by: Serena Li <serena.li.usa@gmail.com>
Co-authored-by: Serena Li <serena.li.usa@gmail.com>
Co-authored-by: Serena Li <serena.li.usa@gmail.com>
Co-authored-by: Serena Li <serena.li.usa@gmail.com>
BattlecodeTable.tsx
element, with support for pagination via an optionalBattlecodeTableBottomElement.tsx
bottom element!