@@ -5,7 +5,6 @@ import { path } from "../utils/api.ts";
5
5
import type { Package , PackageVersion , Stats } from "../utils/api_types.ts" ;
6
6
import type { PanelEntry } from "../components/ListPanel.tsx" ;
7
7
import { ListPanel } from "../components/ListPanel.tsx" ;
8
- import twas from "$twas" ;
9
8
import { Head } from "$fresh/runtime.ts" ;
10
9
import { ComponentChildren } from "preact" ;
11
10
@@ -23,14 +22,14 @@ export default function Home({ data }: PageProps<Data>) {
23
22
</ Head >
24
23
25
24
< div class = "grid grid-cols-1 gap-8 lg:grid-cols-3 md:gap-14" >
26
- < ListPanel title = "New Packages" >
27
- { data . stats . newest . map ( PackageToPanelEntry ) }
25
+ < ListPanel title = "Featured Packages" >
26
+ { data . stats . featured . map ( PackageToPanelEntry ) }
28
27
</ ListPanel >
29
28
< ListPanel title = "Recent updates" >
30
29
{ data . stats . updated . map ( PackageVersionToPanelEntry ) }
31
30
</ ListPanel >
32
- < ListPanel title = "Featured Packages" >
33
- { data . stats . featured . map ( PackageToPanelEntryNoLabel ) }
31
+ < ListPanel title = "New Packages" >
32
+ { data . stats . newest . map ( PackageToPanelEntry ) }
34
33
</ ListPanel >
35
34
</ div >
36
35
@@ -184,16 +183,6 @@ function BenefitText({ children }: { children: ComponentChildren }) {
184
183
185
184
function PackageToPanelEntry (
186
185
entry : Package ,
187
- ) : PanelEntry {
188
- return {
189
- value : `@${ entry . scope } /${ entry . name } ` ,
190
- href : `/@${ entry . scope } /${ entry . name } ` ,
191
- label : twas ( new Date ( entry . createdAt ) ) ,
192
- } ;
193
- }
194
-
195
- function PackageToPanelEntryNoLabel (
196
- entry : Package ,
197
186
) : PanelEntry {
198
187
return {
199
188
value : `@${ entry . scope } /${ entry . name } ` ,
0 commit comments