From a71351325d04bf805a2049ff731bfbf0f33ad6cd Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Thu, 6 Jun 2024 16:05:12 +0200 Subject: [PATCH] Fix error for accessing key prop in PublishDate --- src/app/[...parts]/_page/DiffIntro/PublishDate.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/[...parts]/_page/DiffIntro/PublishDate.tsx b/src/app/[...parts]/_page/DiffIntro/PublishDate.tsx index c34dbeb4..00ce7c92 100644 --- a/src/app/[...parts]/_page/DiffIntro/PublishDate.tsx +++ b/src/app/[...parts]/_page/DiffIntro/PublishDate.tsx @@ -1,4 +1,3 @@ -import { type ComponentPropsWithoutRef } from "react"; import ClientDate from "^/components/ClientDate"; import Skeleton from "^/components/ui/Skeleton"; import getVersionData from "^/lib/api/npm/getVersionData"; @@ -6,13 +5,14 @@ import { cx } from "^/lib/cva"; import type SimplePackageSpec from "^/lib/SimplePackageSpec"; import suspense from "^/lib/suspense"; -export interface PublishDateProps extends ComponentPropsWithoutRef<"div"> { +export interface PublishDateProps { + className?: string; pkg: SimplePackageSpec; } const shared = cx("my-1 flex h-5 items-center justify-center"); -async function PublishDate({ pkg, className, ...props }: PublishDateProps) { +async function PublishDate({ pkg, className }: PublishDateProps) { const versionData = await getVersionData(pkg); const time = versionData[pkg.version]?.time ?? null; @@ -21,7 +21,6 @@ async function PublishDate({ pkg, className, ...props }: PublishDateProps) { ); }