small tweaks

This commit is contained in:
Dylan Pizzo
2025-01-06 22:28:57 -05:00
parent 28f214fb51
commit 9cef34b976
4 changed files with 37 additions and 6 deletions

View File

@ -1,8 +1,12 @@
import { useState } from "react";
import { sampleCard } from "../sampleData.ts";
import { sampleCard1, sampleCard2 } from "../sampleData.ts";
import { Card } from "./Card.tsx";
export const App = () => {
const [count, setCount] = useState(0);
return <div><Card key={count} card={sampleCard}/><button onClick={() => {setCount(c => c+1)}}>Rerender (for fonts)</button></div>;
return <div>
<Card key={`1-${count}`} card={sampleCard1}/>
<Card key={`2-${count}`} card={sampleCard2}/>
<button onClick={() => {setCount(c => c+1)}}>Rerender (for fonts)</button>
</div>;
};