Add package deprecation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -5,7 +5,7 @@ import DB, { IPackage } from "../db.ts";
|
||||
import { sortVersions } from "../utils.ts";
|
||||
|
||||
function Package({ pkg }: { pkg: IPackage }) {
|
||||
const { name, versions, author, description } = pkg;
|
||||
const { name, versions, author, description, deprecated } = pkg;
|
||||
|
||||
const sorted = versions.sort(sortVersions).reverse();
|
||||
|
||||
@ -17,6 +17,7 @@ function Package({ pkg }: { pkg: IPackage }) {
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
{name} <span class="badge">{sorted[0]}</span>
|
||||
{deprecated && <span class="badge warning">deprecated</span>}
|
||||
</h4>
|
||||
<h5 class="card-subtitle">By {author}</h5>
|
||||
<div class="card-text">
|
||||
|
Reference in New Issue
Block a user