fix: use CollectionEntry type where possible
This commit is contained in:
parent
aa26e7cd55
commit
82b68b9f11
8 changed files with 107 additions and 104 deletions
|
@ -80,7 +80,7 @@ const listFormatter = new Intl.ListFormat("en-GB", {
|
|||
article.data.tags ? (
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<Icon name="mdi:tag" />
|
||||
{article.data.tags.map((tag: any) => (
|
||||
{article.data.tags.map((tag: string) => (
|
||||
<a
|
||||
href={`/tags/${createSlug(tag)}`}
|
||||
class="underline hover:no-underline"
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
import FormattedDate from "@components/FormattedDate.astro";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
|
||||
type Props = {
|
||||
collection: any;
|
||||
collection: CollectionEntry<"posts" | "projects">;
|
||||
};
|
||||
|
||||
const { collection } = Astro.props;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
import { Image } from "astro:assets";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
|
||||
type Props = {
|
||||
collection: any;
|
||||
collection: CollectionEntry<"projects">;
|
||||
};
|
||||
|
||||
const { collection } = Astro.props;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
import { Image } from "astro:assets";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
|
||||
interface Props {
|
||||
interval?: number;
|
||||
images: any;
|
||||
images: CollectionEntry<"projects">[];
|
||||
}
|
||||
|
||||
const { interval = 3000, images } = Astro.props;
|
||||
|
|
|
@ -4,7 +4,7 @@ description: "What would you do if you awoke to find your breakfast entirely bea
|
|||
date: 2026-01-01
|
||||
updated: 2026-01-01
|
||||
image: { url: "capsule.avif", alt: "MUST FIND BEANS Title Logo" }
|
||||
tags: ["godot", "blender", "test"]
|
||||
tags: ["godot", "blender"]
|
||||
categories: ["personal"]
|
||||
includeHero: true
|
||||
draft: true
|
||||
|
|
|
@ -37,7 +37,7 @@ const allTagsSorted = freqSort(allTags);
|
|||
class="text-tertiary animate-reveal flex flex-wrap items-center gap-2 opacity-0 [animation-delay:0.1s]"
|
||||
>
|
||||
{
|
||||
allTagsSorted.map((tag: any) => (
|
||||
allTagsSorted.map((tag: string) => (
|
||||
<a
|
||||
href={`/tags/${createSlug(tag)}`}
|
||||
class="underline hover:no-underline"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue