From 6d870a707cda97aa7e34a52a44f3dfd6c60d5fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 28 Feb 2024 15:37:36 +0100 Subject: [PATCH] cleanup: Change home page column ordering and version labels --- frontend/routes/index.tsx | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/frontend/routes/index.tsx b/frontend/routes/index.tsx index dad34b66..7b498ee6 100644 --- a/frontend/routes/index.tsx +++ b/frontend/routes/index.tsx @@ -5,7 +5,6 @@ import { path } from "../utils/api.ts"; import type { Package, PackageVersion, Stats } from "../utils/api_types.ts"; import type { PanelEntry } from "../components/ListPanel.tsx"; import { ListPanel } from "../components/ListPanel.tsx"; -import twas from "$twas"; import { Head } from "$fresh/runtime.ts"; import { ComponentChildren } from "preact"; @@ -23,14 +22,14 @@ export default function Home({ data }: PageProps) {
- - {data.stats.newest.map(PackageToPanelEntry)} + + {data.stats.featured.map(PackageToPanelEntry)} {data.stats.updated.map(PackageVersionToPanelEntry)} - - {data.stats.featured.map(PackageToPanelEntryNoLabel)} + + {data.stats.newest.map(PackageToPanelEntry)}
@@ -184,16 +183,6 @@ function BenefitText({ children }: { children: ComponentChildren }) { function PackageToPanelEntry( entry: Package, -): PanelEntry { - return { - value: `@${entry.scope}/${entry.name}`, - href: `/@${entry.scope}/${entry.name}`, - label: twas(new Date(entry.createdAt)), - }; -} - -function PackageToPanelEntryNoLabel( - entry: Package, ): PanelEntry { return { value: `@${entry.scope}/${entry.name}`,