Create a React component for src/components/ProjectStatus.tsx. Here are the instructions:
Issue: Create a ProjectStatus.tsx React component for displaying project status
Background
We need a new React component called ProjectStatus.tsx to display the status of a project. This component will be used in the project page to show the current status of Otto and the progress of the project. The component should be written in TypeScript using ES6 syntax like arrow functions and should utilize Tailwind CSS for styling.
Task
Create a new React component called ProjectStatus.tsx in the src/components directory. This component will receive a project prop of type Project (from the types.ts file) and display the project status information.
Instructions
In the src/components directory, create a new file called ProjectStatus.tsx.
Import the necessary libraries and types at the top of the file:
import React from "react";
import { Project } from "~/types";
Define the Props interface for this component:
interface Props {
project: Project;
}
Create a functional component called ProjectStatus that takes the Props interface as its argument:
const ProjectStatus: React.FC<Props> = ({ project }) => {
// Component logic and rendering here
};
Inside the ProjectStatus component, extract the relevant information from the project prop:
Render the project status information using Tailwind CSS for styling. Display the project name, description, creation date, and last update date in a visually appealing manner. For example:
Create a React component for src/components/ProjectStatus.tsx. Here are the instructions:
Issue: Create a ProjectStatus.tsx React component for displaying project status
Background
We need a new React component called
ProjectStatus.tsx
to display the status of a project. This component will be used in the project page to show the current status of Otto and the progress of the project. The component should be written in TypeScript using ES6 syntax like arrow functions and should utilize Tailwind CSS for styling.Task
Create a new React component called
ProjectStatus.tsx
in thesrc/components
directory. This component will receive aproject
prop of typeProject
(from thetypes.ts
file) and display the project status information.Instructions
In the
src/components
directory, create a new file calledProjectStatus.tsx
.Import the necessary libraries and types at the top of the file:
Define the
Props
interface for this component:Create a functional component called
ProjectStatus
that takes theProps
interface as its argument:Inside the
ProjectStatus
component, extract the relevant information from theproject
prop:Render the project status information using Tailwind CSS for styling. Display the project name, description, creation date, and last update date in a visually appealing manner. For example:
Export the
ProjectStatus
component as the default export:Notes
~
alias for the root directory (src). The tsconfig paths configuration is already set up:{"~/*": ["./src/*"]}
.project
prop of typeProject
.Once the
ProjectStatus.tsx
component is complete, submit a pull request for review.