Skip to content

Commit

Permalink
Add resource type to resource list
Browse files Browse the repository at this point in the history
  • Loading branch information
aberonni committed Jan 12, 2024
1 parent 06ba4bf commit e64caa4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ResourceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Alert, AlertDescription, AlertTitle } from "~/components/ui/alert";
import { ExclamationTriangleIcon, EyeClosedIcon } from "@radix-ui/react-icons";

import type { RouterOutputs } from "~/utils/api";
import { ResourceTypeLabels } from "./Resource";

export const ResourceList = ({
filter,
Expand Down Expand Up @@ -67,7 +68,7 @@ export const ResourceList = ({
.join(", ")}`}</p>
)}
</div>
{showPublishedStatus && (
{showPublishedStatus ? (
<Badge
className={clsx(
"self-start text-white",
Expand All @@ -77,6 +78,10 @@ export const ResourceList = ({
>
{resource.published ? "Published" : "Pending approval"}
</Badge>
) : (
<Badge variant="secondary">
{ResourceTypeLabels[resource.type]}
</Badge>
)}
</Link>
))}
Expand Down

0 comments on commit e64caa4

Please sign in to comment.