From 73b302eea2c45f57252f09f81c0f35b4ca28e706 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:56:06 +0000 Subject: [PATCH] refactor: remove deprecated React.forwardRef in buttons Co-authored-by: SayanthRock <202829406+SayanthRock@users.noreply.github.com> --- src/components/ContactButton.tsx | 50 +++++++++++++--------------- src/components/LiveProjectButton.tsx | 42 +++++++++++------------ 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/components/ContactButton.tsx b/src/components/ContactButton.tsx index 470cd2f..e1a139f 100644 --- a/src/components/ContactButton.tsx +++ b/src/components/ContactButton.tsx @@ -1,32 +1,30 @@ -import React from 'react'; +import { type ComponentProps } from 'react'; import { cn } from '../utils/cn'; -interface ContactButtonProps extends React.ButtonHTMLAttributes { +interface ContactButtonProps extends ComponentProps<'button'> { className?: string; } -export const ContactButton = React.forwardRef( - ({ className, ...props }, ref) => { - return ( - - ); - } -); +export const ContactButton = ({ className, ref, ...props }: ContactButtonProps) => { + return ( + + ); +}; ContactButton.displayName = 'ContactButton'; diff --git a/src/components/LiveProjectButton.tsx b/src/components/LiveProjectButton.tsx index 0e9a72e..db5d9eb 100644 --- a/src/components/LiveProjectButton.tsx +++ b/src/components/LiveProjectButton.tsx @@ -1,28 +1,26 @@ -import React from 'react'; +import { type ComponentProps } from 'react'; import { cn } from '../utils/cn'; -interface LiveProjectButtonProps extends React.ButtonHTMLAttributes { +interface LiveProjectButtonProps extends ComponentProps<'button'> { className?: string; } -export const LiveProjectButton = React.forwardRef( - ({ className, ...props }, ref) => { - return ( - - ); - } -); +export const LiveProjectButton = ({ className, ref, ...props }: LiveProjectButtonProps) => { + return ( + + ); +}; LiveProjectButton.displayName = 'LiveProjectButton';