mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-07 14:46:38 +02:00
Don't generate code for Ads while snapping
This commit is contained in:
@@ -12,6 +12,10 @@ const Ad: React.FC<{}> = () => {
|
|||||||
const source = 'https://cdn.carbonads.com/carbon.js?serve=CE7I6KQL&placement=csslayoutio';
|
const source = 'https://cdn.carbonads.com/carbon.js?serve=CE7I6KQL&placement=csslayoutio';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
// Ignore if the code is reached in snapping mode
|
||||||
|
if (navigator.userAgent === 'ReactSnap') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const container = containerRef.current;
|
const container = containerRef.current;
|
||||||
if (!container) {
|
if (!container) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user