Files
a575f0bf-5453-4c69-8b6c-aca…/src/components/sections/hero/HeroExpand.tsx

18 lines
396 B
TypeScript

import { useEffect, useCallback } from 'react';
interface HeroExpandProps {
title: string;
onComplete?: () => void;
}
export default function HeroExpand({ title, onComplete }: HeroExpandProps) {
const handleComplete = useCallback(() => {
if (onComplete) onComplete();
}, [onComplete]);
useEffect(() => {
handleComplete();
}, [handleComplete]);
return <h1>{title}</h1>;
}