commit b8649eef90f3223339ff5c0c93fcd6dfde3ce75d
parent a234d2b2a0a29e13612c0ab7798d65d79819a84a
Author: Sebastian <sebasjm@gmail.com>
Date: Tue, 14 Oct 2025 11:13:47 -0300
fix #10371
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/components/ShowQRsForPaytoPopup.tsx b/packages/taler-wallet-webextension/src/components/ShowQRsForPaytoPopup.tsx
@@ -62,8 +62,8 @@ const AccordionCss = styled.div`
interface Props { qrs: QrCodeSpec[], onClose: ButtonHandler };
-function Accordion({ section, content }: { section: string, content: string }): VNode {
- const [opened, setOpened] = useState(false)
+function Accordion({ section, content, openedByDefault }: { section: string, content: string, openedByDefault?:boolean }): VNode {
+ const [opened, setOpened] = useState(!!openedByDefault)
return <AccordionCss>
<button class={opened ? "accordion active" : "accordion"} onClick={() => { setOpened(!opened) }}>{section}</button>
<div class="panel" style={{ display: opened ? "block" : "none" }}>
@@ -83,7 +83,7 @@ export function ShowQRsForPaytoPopup({ qrs, onClose }: Props): VNode {
return <tr key={idx}>
<td>
- <Accordion section={q.type} content={q.qrContent} />
+ <Accordion section={q.type} content={q.qrContent} openedByDefault />
</td>
</tr>
})}