diff --git a/src/components/payment/Checkout.module.scss b/src/components/payment/Checkout.module.scss index 6a8db1879..041489892 100644 --- a/src/components/payment/Checkout.module.scss +++ b/src/components/payment/Checkout.module.scss @@ -10,16 +10,14 @@ } .checkout-picture { - height: 6rem; - border-radius: 0.5rem; + margin: 0.25rem 0.75rem 0 0; - @supports (aspect-ratio: 1) { - margin: 0.25rem 0.75rem 0 0; - min-width: 0; - width: 100%; - max-width: 8rem; - height: auto; - } + min-width: 0; + width: 100%; + max-width: 8rem; + height: auto; + + border-radius: 0.5rem; } .text { diff --git a/src/components/payment/Checkout.tsx b/src/components/payment/Checkout.tsx index 03d8dde0b..d80bffa29 100644 --- a/src/components/payment/Checkout.tsx +++ b/src/components/payment/Checkout.tsx @@ -18,6 +18,7 @@ import { formatCurrency } from '../../util/formatCurrency'; import renderText from '../common/helpers/renderText'; import useMedia from '../../hooks/useMedia'; +import useMediaTransition from '../../hooks/useMediaTransition'; import useOldLang from '../../hooks/useOldLang'; import SafeLink from '../common/SafeLink'; @@ -90,6 +91,8 @@ const Checkout: FC = ({ const photoUrl = useMedia(getWebDocumentHash(photo)); + const ref = useMediaTransition(photoUrl); + const handleTipsClick = useCallback((tips: number) => { dispatch!({ type: 'setTipAmount', payload: maxTipAmount ? Math.min(tips, maxTipAmount) : tips }); }, [dispatch, maxTipAmount]); @@ -164,7 +167,17 @@ const Checkout: FC = ({ return (
- {photoUrl && } + {photoUrl && ( + + )} {!photoUrl && photo && (