Skip to content

add dynamic property data fetching and update PropertyListing component#27

Open
IngramCapa wants to merge 6 commits intorightmove:masterfrom
IngramCapa:feat/add-dynamic-property-data
Open

add dynamic property data fetching and update PropertyListing component#27
IngramCapa wants to merge 6 commits intorightmove:masterfrom
IngramCapa:feat/add-dynamic-property-data

Conversation

@IngramCapa
Copy link
Copy Markdown

  • Added a new getPropertiesData function in api/getPropertiesData.js to fetch property data from a local API endpoint, including error handling for failed requests.

  • Updated api/index.js to export the new getPropertiesData function for use throughout the codebase.

  • Refactored PropertyListing.jsx to use React state and useEffect for fetching property data via the new API function, replacing the previous dummy property data.

  • Updated the test in PropertyListing.spec.jsx to mock the fetch API, provide sample property data, and verify that the correct number of property cards are rendered based on the API response.

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.

1 participant