Skip to content
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

Add description to the UI #72

Merged
merged 11 commits into from
Dec 29, 2024
10 changes: 9 additions & 1 deletion src/components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@
}
`;

const Description = styled.p`
margin: 0;
font-size: 1rem;
color: #000000;
guibranco marked this conversation as resolved.
Show resolved Hide resolved
`;

/**
* A functional component that renders a project card displaying project details.
*
* @component
* @param {Object} props - The properties for the ProjectCard component.
* @param {string} props.title - The title of the project.
* @param {string} props.slug - The unique identifier for the project, used in URLs.
* @param {string} props.description - The description of the project.
* @param {string} props.slug - The unique identifier for the project is used in URLs.
guibranco marked this conversation as resolved.
Show resolved Hide resolved
* @param {number} props.apiVersion - The version of the API to be displayed.
*
* @returns {JSX.Element} A JSX element representing the project card.
Expand Down Expand Up @@ -94,6 +101,7 @@
API (v{apiVersion})
</LinkButton>
</Links>
<Description>{description}</Description>

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/App.test.tsx > App Component > renders the Header component

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/App.test.tsx > App Component > renders the ProjectGrid component with projects

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/App.test.tsx > App Component > renders the Footer component

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > renders the project title

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > renders the project image with the correct src and alt attributes

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > renders the UI link with the correct URL

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > renders the Swagger link with the correct URL

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > renders the API link with the correct URL and API version

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectCard.test.tsx > ProjectCard Component > applies hover styles correctly

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / SonarCloud

test/components/ProjectGrid.test.tsx > ProjectGrid Component > renders a grid of project cards

ReferenceError: description is not defined ❯ ProjectCard src/components/ProjectCard.tsx:104:23 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41 ❯ renderRootSync node_modules/react-dom/cjs/react-dom-client.development.js:14850:11 ❯ performWorkOnRoot node_modules/react-dom/cjs/react-dom-client.development.js:14384:44

Check failure on line 104 in src/components/ProjectCard.tsx

View workflow job for this annotation

GitHub Actions / Build and Test

Cannot find name 'description'. Did you mean 'Description'?
guibranco marked this conversation as resolved.
Show resolved Hide resolved
guibranco marked this conversation as resolved.
Show resolved Hide resolved
</Content>
</Card>
);
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface Project {
title: string;
description: string;
slug: string;
apiVersion: number;
}
guibranco marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading