-
Notifications
You must be signed in to change notification settings - Fork 5
Ticket 116 - mockup for API call #386
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
base: main
Are you sure you want to change the base?
Conversation
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.
(nit) The "health" page is often used to make sure the application is working, think we still use that on grants.gov https://github.com/HHS/simpler-grants-gov/blob/main/frontend/src/app/%5Blocale%5D/health/page.tsx . I would recommend keeping it as is and creating a separate page for this.
@@ -1,3 +1,37 @@ | |||
'use client' |
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.
(nit) This means the whole may be rendered in the client. Alternatively the members list could be a client component that the page uses so the page could still be rendered server side.
export default function Page() { | ||
return <>healthy</>; | ||
const [members, setMembers] = useState<Member[]>([]); |
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.
It would be nice to have an error and loading states.
|
||
useEffect(() => { | ||
getMembers(); | ||
}, []); |
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.
getMembers should be a dependency
Ticket
Resolves #116
Changes
Added in an API example
Context for reviewers
Created a new file for the service calls and called it on the health page in order to display member information
Testing