From eceeec6aedb10d24fb8e0fe8bf5427d3a3d2d290 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 12 Apr 2025 00:38:38 -0500 Subject: [PATCH] Fix LinkWithStatus children prop --- src/components/LinkWithStatus.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/LinkWithStatus.tsx b/src/components/LinkWithStatus.tsx index 0df67852..e49dd5c8 100644 --- a/src/components/LinkWithStatus.tsx +++ b/src/components/LinkWithStatus.tsx @@ -1,7 +1,7 @@ 'use client'; -import { ComponentProps, ReactNode, useState } from 'react'; -import Link from 'next/link'; +import { ReactNode, useState } from 'react'; +import Link, { LinkProps } from 'next/link'; import LinkWithStatusChild from './primitives/LinkWithStatusChild'; import clsx from 'clsx/lite'; @@ -12,8 +12,9 @@ export default function LinkWithStatus({ isLoading: isLoadingProp = false, setIsLoading: setIsLoadingProp, ...props -}: ComponentProps & { +}: LinkProps & { children: ReactNode | ((props: { isLoading: boolean }) => ReactNode) + className?: string loadingClassName?: string // For hoisting state to a parent component, e.g., isLoading?: boolean