Skip to content

Conversation

@KayTV
Copy link

@KayTV KayTV commented Mar 11, 2025

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

Screenshot 2025-03-11 at 1 37 01 PM

Copy link
Member

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'
Copy link
Member

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[]>([]);
Copy link
Member

@acouch acouch May 14, 2025

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();
}, []);
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add example API request approach

2 participants