Skip to content

Commit 89b3226

Browse files
committed
Add some small polishing around collections
1 parent dae88da commit 89b3226

5 files changed

Lines changed: 9 additions & 19 deletions

File tree

cms/content/collections.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
{
2020
"slug": "testing",
2121
"name": "Testing"
22+
},
23+
{
24+
"slug": "code-review",
25+
"name": "Code Review"
2226
}
2327
]
2428
}

cms/content/notes/effective-code-reviews.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ spoiler:
77
title: "Revisiones de código efectivas"
88
url: "/notes/effective-code-reviews"
99
published: true
10+
collections:
11+
- code-review
1012
---
1113

1214
# Revisiones de código efectivas

pages/collections.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { GetStaticProps } from "next";
2-
import NextLink from "next/link";
32

43
import { ApiCollection } from "@/cms/api/ApiCollection";
54
import { getCollectionRepository } from "@/cms/repositories";
6-
import { Application } from "@/layouts/Application";
5+
import { Collections } from "@/components/Collections";
76
import { Heading } from "@/components/Heading";
87
import { Text } from "@/components/Text";
9-
import { Link } from "@/components/Link";
8+
import { Application } from "@/layouts/Application";
109

1110
type CollectionsPageProps = {
1211
collections: ApiCollection[];
@@ -22,15 +21,7 @@ export default function CollectionsPage(props: CollectionsPageProps) {
2221

2322
<Text size="l">Articles are sometimes grouped into collections. Here you may find all of them.</Text>
2423

25-
<ul className="Page__Collections">
26-
{props.collections.map((collection) => (
27-
<li key={collection.slug}>
28-
<Link as={NextLink} href={`/collections/${collection.slug}`}>
29-
#{collection.slug}
30-
</Link>
31-
</li>
32-
))}
33-
</ul>
24+
<Collections collections={props.collections} />
3425
</Application.Article>
3526
</Application>
3627
);

styles/index.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
@import "../layouts/Posts/style.css";
2929

3030
@import "./pages/index.css";
31-
@import "./pages/collections.css";
3231
@import "./pages/collections/[slug].css";
3332

3433
:root {

styles/pages/collections.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)