Bingran You
Mirror SkillsBench v1.1 as a benchmark task-tree dataset
d03762b
Raw
History Blame Contribute Delete
506 Bytes
'use client';
import { useState, useEffect } from 'react';
const API_URL = '';
export default function Banner() {
const [promo, setPromo] = useState<string>('');
useEffect(() => {
fetch(`${API_URL}/api/banner`)
.then(r => r.json())
.then(data => setPromo(data.text));
}, []);
if (!promo) return null;
return (
<div
data-testid="promo-banner"
className="bg-[#0070f3] text-white py-24 px-4 text-center font-bold text-2xl"
>
{promo}
</div>
);
}