clipper: default to simplified mode if user is no longer pro

This commit is contained in:
Abdullah Atta
2023-05-16 17:30:28 +05:00
committed by Abdullah Atta
parent 899e56e9cd
commit 2c3c193629

View File

@@ -130,6 +130,13 @@ export function Main() {
useEffect(() => {
(async () => {
if (!clipArea || !clipMode) return;
if (
!isPremium &&
(clipMode === "complete" || clipMode === "screenshot")
) {
setClipMode("simplified");
return;
}
try {
setIsClipping(true);
@@ -141,7 +148,7 @@ export function Main() {
setIsClipping(false);
}
})();
}, [clipArea, clipMode, clipNonce]);
}, [isPremium, clipArea, clipMode, clipNonce]);
return (
<FlexScrollContainer style={{ maxHeight: 560 }}>