Skip to content

Commit 0766710

Browse files
committed
fix adblock conflict
1 parent ec446a7 commit 0766710

File tree

7 files changed

+7
-5
lines changed

7 files changed

+7
-5
lines changed

src/components/List/ListComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { ReactNode, useEffect } from 'react'
22
import { Placeholder } from 'src/components/placeholders'
33
import { MAX_ITEMS_PER_CARD } from 'src/config'
4-
import { BannerAd } from 'src/features/ads'
4+
import { AdvBanner } from 'src/features/adv'
55
import { useRemoteConfigStore } from 'src/features/remoteConfig'
66
import { BaseEntry } from 'src/types'
77

@@ -82,7 +82,7 @@ export function ListComponent<T extends BaseEntry>(props: ListComponentPropsType
8282
}
8383

8484
if (canAdsLoad && adsConfig.enabled && withAds && index === adsConfig.rowPosition) {
85-
content.unshift(<BannerAd key={'banner-ad'} />)
85+
content.unshift(<AdvBanner key={'hello-word'} />)
8686
}
8787

8888
return content

src/features/ads/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { useState } from 'react'
22
import { AdPlaceholder } from 'src/components/placeholders'
33
import { useUserPreferences } from 'src/stores/preferences'
44
import { useGetAd } from '../api/getAd'
5-
import './BannerAd.css'
5+
import './AdvBanner.css'
66

7-
export const BannerAd = () => {
7+
export const AdvBanner = () => {
8+
console.log('Hello')
89
const { userSelectedTags } = useUserPreferences()
910

1011
const [aditionalAdQueries, setAditionalAdQueries] = useState<
@@ -20,6 +21,7 @@ export const BannerAd = () => {
2021
config: {
2122
cacheTime: 0,
2223
staleTime: 0,
24+
useErrorBoundary: false,
2325
refetchInterval(data) {
2426
if (data?.nextAd) {
2527
setAditionalAdQueries(data.nextAd.queries)

src/features/adv/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/AdvBanner'

0 commit comments

Comments
 (0)