From 01bdc6e1cf1f8a97c13c503645fd728819417f90 Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 8 May 2024 16:45:54 +1000 Subject: [PATCH] fix: make sure qr code fits the canvas contents --- ts/components/SessionQRCode.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/components/SessionQRCode.tsx b/ts/components/SessionQRCode.tsx index 54354f525..99897af33 100644 --- a/ts/components/SessionQRCode.tsx +++ b/ts/components/SessionQRCode.tsx @@ -1,7 +1,7 @@ import { isEmpty } from 'lodash'; import { CSSProperties, MouseEvent, useState } from 'react'; import { QRCode } from 'react-qrcode-logo'; -import { useMount } from 'react-use'; +import useMount from 'react-use/lib/useMount'; import styled from 'styled-components'; import { THEME_GLOBALS, getThemeValue } from '../themes/globals'; import { saveQRCode } from '../util/saveQRCode'; @@ -19,6 +19,8 @@ const StyledQRView = styled(AnimatedFlex)<{ border-radius: 10px; overflow: hidden; padding: 10px; + width: fit-content; + height: auto; ${props => props.backgroundColor && ` background-color: ${props.backgroundColor}`}; ${props =>