Skip to content

Commit

Permalink
improve display of description
Browse files Browse the repository at this point in the history
  • Loading branch information
ciyer committed Nov 16, 2023
1 parent b0642f6 commit 0699712
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions client/src/features/projectsV2/show/ProjectV2Show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,28 @@ function ProjectV2Header({ project }: ProjectV2HeaderProps) {
);
}

function ProjectV2Description({ description }: Pick<Project, "description">) {
const desc =
description == null
? "(no description)"
: description.length < 1
? "(no description)"
: description;
return (
<>
<p className="fs-5">{desc}</p>
</>
);
}

interface ProjectV2DisplayProps {
project: Project;
}

function ProjectV2Display({ project }: ProjectV2DisplayProps) {
return (
<>
<Label>Description</Label>
<p className="fs-5">{project.description}</p>
<ProjectV2Description description={project.description} />
<Label>Repositories</Label>
{project.repositories?.map((repo, i) => (
<div key={i}>{repo}</div>
Expand Down

0 comments on commit 0699712

Please sign in to comment.