This PR implements a new Star Wars page that fetches and displays a list of Star Wars characters using the SWAPI API. It also includes UI components to display character cards, a loader, an error message, and a modal with more information about each character. The character cards are colored based on the character's species and have hover animations. The modal displays information about the character's height, mass, birth year, and the number of films they appear in. It also fetches and displays information about the character's homeworld, including its name, terrain, climate, and number of residents.
Summary of Changes
Created a new service swapiService.ts to fetch data from the SWAPI API.
Created a new component CharacterList.tsx to display a list of Star Wars characters.
Created a new component CharacterCard.tsx to display a single Star Wars character.
Created a new component Loader.tsx to display a loader while fetching data.
Created a new component Error.tsx to display an error message if the API request fails.
Created a new component CharacterModal.tsx to display more information about a character in a modal.
Modified the main application component App.tsx to include the new components.
Modified the CSS file index.css to style the new components.
Please review and merge this PR to add the Star Wars page to the application.
Fixes #2.
π Latest improvements to Sweep:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
π‘ To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback: π
Description
This PR implements a new Star Wars page that fetches and displays a list of Star Wars characters using the SWAPI API. It also includes UI components to display character cards, a loader, an error message, and a modal with more information about each character. The character cards are colored based on the character's species and have hover animations. The modal displays information about the character's height, mass, birth year, and the number of films they appear in. It also fetches and displays information about the character's homeworld, including its name, terrain, climate, and number of residents.
Summary of Changes
swapiService.ts
to fetch data from the SWAPI API.CharacterList.tsx
to display a list of Star Wars characters.CharacterCard.tsx
to display a single Star Wars character.Loader.tsx
to display a loader while fetching data.Error.tsx
to display an error message if the API request fails.CharacterModal.tsx
to display more information about a character in a modal.App.tsx
to include the new components.index.css
to style the new components.Please review and merge this PR to add the Star Wars page to the application.
Fixes #2.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: