fix(name,title): handle empty states in "did you know" section

This commit is contained in:
zyachel
2025-06-01 13:08:06 +00:00
committed by ngn
parent e98ab85034
commit 34bcdc3b05
2 changed files with 53 additions and 36 deletions

View File

@ -7,7 +7,13 @@ type Props = {
};
const DidYouKnow = ({ data }: Props) => {
if (!Object.keys(data).length) return <></>;
if (!Object.keys(data).length)
return (
<section className={styles.didYouKnow}>
<h2 className='heading heading__secondary'>Did you know</h2>
<p>Nothing interesting to show.</p>
</section>
);
return (
<section className={styles.didYouKnow}>
<h2 className='heading heading__secondary'>Did you know</h2>