collin/mahjong
| 1 | import { useMemo } from 'react'; |
| 2 | import { renderSVG } from 'uqr'; |
| 3 | |
| 4 | /** |
| 5 | * The QR that hands a seat to a phone. Just the code — where it sits and which |
| 6 | * way it faces is its seat's business, and it reads at any angle anyway. |
| 7 | */ |
| 8 | export function SeatQr({ url }: { url: string }) { |
| 9 | const svg = useMemo(() => renderSVG(url, { border: 1 }), [url]); |
| 10 | return <div className="seat-qr" dangerouslySetInnerHTML={{ __html: svg }} />; |
| 11 | } |