Wait for fonts to load

This commit is contained in:
Dylan Pizzo
2025-01-07 23:07:20 -08:00
parent 03fff8576e
commit 7a752a92cb
6 changed files with 48 additions and 26 deletions

View File

@@ -1,13 +1,10 @@
import { useState } from "react";
import { cards } from "../cards.ts";
import { Card } from "./Card.tsx";
export const App = () => {
const [count, setCount] = useState(0);
return <div>
{cards.map((card) => {
return <Card key={`${card.title}-${count}`} card={card}/>
return <Card key={`${card.title}`} card={card}/>
})}
<button onClick={() => {setCount(c => c+1)}}>Rerender (for fonts)</button>
</div>;
};