-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: connect api with dashboard #48
Conversation
538ed5f
to
dda3bd9
Compare
b320a7c
to
d176e45
Compare
4f887bb
to
fa28899
Compare
<TableCell><div className={backgroundClassName}>{row.buildStatus}</div></TableCell> | ||
<TableCell> | ||
<div className={backgroundClassName}> | ||
{row.testStatus + " "} |
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.
CSS should do this space
@@ -24,22 +20,27 @@ const treeTableColumnsLabelId = [ | |||
'treeTable.test' | |||
]; | |||
|
|||
const TreeTableRow = (row: ITreeTableBody): JSX.Element => { | |||
const TreeTableRow = (row: TreeTableBody): JSX.Element => { | |||
const backgroundClassName = "bg-lightGray w-fit h-fit p-1 rounded-lg"; |
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.
since this won't change, you could move it to a global scope
dashboard/src/api/Tree.tsx
Outdated
const fetchTreeCheckoutData = async(): Promise<Checkout[]> => { | ||
const res = await fetch('/api/tree'); | ||
if (!res.ok) { | ||
throw new Error('Network response was not ok'); |
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.
Can we be more specific? maybe Request to /api/tree response was not ok
@@ -54,7 +56,19 @@ const TableInfo = ({ | |||
}; | |||
|
|||
const TreeMonitorListingPage = (): JSX.Element => { | |||
const listItems = treeTableRows; | |||
|
|||
const { data } = useTreeTable(); |
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.
Hmm.. I'm trying to think of a name that makes it clearer what useTreeTable
is for 🤔
dashboard/src/components/TreeMonitorListingPage/TreeMonitorListingPage.tsx
Outdated
Show resolved
Hide resolved
dashboard/src/components/TreeMonitorListingPage/TreeMonitorListingPage.tsx
Outdated
Show resolved
Hide resolved
onClickBack={onClickGoBack} | ||
onClickForward={onClickGoForward} | ||
/> | ||
<TableInfo |
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.
TableInfo
is showing text in white color which is very hard to see given our background color
- add checkout type - add tree table body commmon type
- create a query client - add query client provider to app - add use query to get data from tree api
- use data returned from api - remove mocked list
- disable back/forward button when there is no more data to show - separate the filter button in a const - fix end index that is show closes #20
fa28899
to
7cd4711
Compare
Description
Related Issues
Visual reference