Skip to content

Commit 0a1c0ba

Browse files
committed
fix: limited tool list display number
Now says the correct number of tools
1 parent bd63de3 commit 0a1c0ba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/ToolList.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,15 @@ const tools: Tool[] = [
4747
date: "2024 06 19",
4848
url: "/tools/random-number-generator",
4949
},
50-
]
51-
.sort((a, b) => new Date(b.date).valueOf() - new Date(a.date).valueOf())
52-
.slice(0, toolCount);
50+
].sort((a, b) => new Date(b.date).valueOf() - new Date(a.date).valueOf());
51+
const toolsLimited: Tool[] = tools.slice(0, toolCount);
5352
5453
const images = import.meta.glob("@/images/*");
5554
---
5655

5756
<ul>
5857
{
59-
tools.map((tool) => (
58+
toolsLimited.map((tool) => (
6059
<li class="tool">
6160
<a href={tool.url} class="contrast">
6261
<div class="hero-image">

0 commit comments

Comments
 (0)