fix: avoid scaling on mobile preview (#1868)

This commit is contained in:
Dhruwang Jariwala
2024-01-09 20:29:43 +05:30
committed by GitHub
parent c376b12461
commit 1d7d07b3c6

View File

@@ -21,6 +21,7 @@ export default function Modal({
const modalRef = useRef<HTMLDivElement | null>(null);
const [windowWidth, setWindowWidth] = useState(window.innerWidth);
const calculateScaling = () => {
if (previewMode === "mobile") return "";
const scaleValue = (() => {
if (windowWidth > 1600) return "1";
else if (windowWidth > 1200) return ".9";