Dočasná oprava zobrazování QR kódů

This commit is contained in:
2023-06-29 12:05:43 +02:00
parent d21291c643
commit 26609ebd6b
3 changed files with 17 additions and 13 deletions

View File

@@ -22,8 +22,8 @@ const api = {
post: <TBody extends BodyInit, TResponse>(url: string, body: TBody) => request<TResponse>(url, { method: 'POST', body, headers: { 'Content-Type': 'application/json' } }),
}
export const getQrUrl = () => {
return `${getBaseUrl()}/api/qr`;
export const getQrUrl = (login: string) => {
return `${getBaseUrl()}/api/qr?login=${login}`;
}
export const getData = async () => {

View File

@@ -353,7 +353,7 @@ function App() {
<div className='qr-code'>
<h3>QR platba</h3>
<div>Částka: {myOrder.totalPrice} </div>
<img src={getQrUrl()} alt='QR kód' />
<img src={getQrUrl(auth.login)} alt='QR kód' />
<p>Generování QR kódů je v experimentální fázi - doporučujeme si překontrolovat údaje před odesláním platby.</p>
</div>
}