Skip to content

Commit

Permalink
Update ProjectCard.tsx (#136)
Browse files Browse the repository at this point in the history
* Update ProjectCard.tsx

* Update ProjectCard.test.tsx
  • Loading branch information
guibranco authored Feb 22, 2025
1 parent 88cea24 commit 42c734b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const Description = styled.p`
*/
const ProjectCard: React.FC<Project> = ({ title, description, slug, apiVersion }) => {
const imageUrl = `project-images/${slug}.png`;
const uiUrl = `https://apibr.com/ui/${slug}`;
const uiUrl = `https://apibr.com/ui/${slug}/`;
const swaggerUrl = `https://apibr.com/${slug}/swagger`;
const apiUrl = `https://apibr.com/${slug}/api/v${apiVersion}`;

Expand Down
2 changes: 1 addition & 1 deletion test/components/ProjectCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("ProjectCard Component", () => {
it("renders the UI link with the correct URL", () => {
render(<ProjectCard {...mockProject} />);
const uiLink = screen.getByText("UI").closest("a");
expect(uiLink).toHaveAttribute("href", `https://apibr.com/ui/${mockProject.slug}`);
expect(uiLink).toHaveAttribute("href", `https://apibr.com/ui/${mockProject.slug}/`);
});

it("renders the Swagger link with the correct URL", () => {
Expand Down

0 comments on commit 42c734b

Please sign in to comment.