"use client";

import { useState, useEffect } from 'react';

export function HelloWorld({message}) {

	const [heure,setHeure] = useState( new Date() );

	useEffect(
		() => {
			const timer = setInterval(
				() => {
					setHeure( new Date() );
				},
				1000 );
			return () => clearInterval( timer );
		}, []
	);

	return <>{message} à {heure.toLocaleTimeString()} </>
}

