-
Notifications
You must be signed in to change notification settings - Fork 48
Connect hosts to api #27
Connect hosts to api #27
Conversation
5a99676
to
5af96ec
Compare
@@ -1,3 +1,9 @@ | |||
export interface Host { | |||
id: string; | |||
name: string; | |||
ip: string; |
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.
The types of the fields of Host
should match whatever the server returns.
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.
done
</Fragment> | ||
); | ||
interface Props { | ||
hostRows: string[][]; |
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.
Let's use a more concrete type here instead of string[][]
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.
done
src/components/HostsTable.tsx
Outdated
const HostsTable: FC = (): JSX.Element => { | ||
const headerStyle = { position: 'sticky', top: 0, background: 'white' }; | ||
interface Props { | ||
hostRows: string[][]; |
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.
Same as 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.
done
5af96ec
to
39b77db
Compare
Fix the selectors to be based on RootState, Add getHostTableRows selector and test Remove HostsExample referendes from App.tsx
39b77db
to
e4ef00e
Compare
Rebased on top of |
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.
Thanks!
Populates HostsTable with actual data from API.
Work in progress
Depends on #22