Skip to content

Commit 8cb58ae

Browse files
authored
Update App.tsx
1 parent c4a9b6f commit 8cb58ae

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/components/App/App.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,6 @@ const App = (props: AppProps) => {
168168

169169
const includeAds = !['/', '/api-keys', '/status'].includes(location.pathname);
170170

171-
React.useEffect(() => {
172-
if (includeAds) {
173-
(window.adsbygoogle = window.adsbygoogle || []).push({});
174-
}
175-
}, []);
176-
177171
return (
178172
// @ts-ignore
179173
<MuiThemeProvider muiTheme={getMuiTheme(darkBaseTheme, muiTheme)}> {/* muiTheme types are missing here */}
@@ -186,15 +180,6 @@ const App = (props: AppProps) => {
186180
/>
187181
<Header location={location} />
188182
<StyledBodyDiv {...props}>
189-
<AdBannerDiv>
190-
{includeAds && config.VITE_ENABLE_ADSENSE && (
191-
<ins
192-
className="adsbygoogle"
193-
style={{ display: 'block', width: 728, height: 90, margin: 'auto' }}
194-
data-ad-client="ca-pub-5591574346816667"
195-
data-ad-slot="9789745633"
196-
/>)}
197-
</AdBannerDiv>
198183
<Switch>
199184
<Route exact path="/" component={Home} />
200185
<Route exact path="/matches/:matchId?/:info?" component={Matches} />
@@ -236,14 +221,6 @@ const App = (props: AppProps) => {
236221
</div>
237222
</div>
238223
)}
239-
{includeAds && config.VITE_ENABLE_ADSENSE && (
240-
<ins
241-
className="adsbygoogle"
242-
style={{ display: 'block', width: 728, height: 90, margin: 'auto' }}
243-
data-ad-client="ca-pub-5591574346816667"
244-
data-ad-slot="7739169508"
245-
/>
246-
)}
247224
</AdBannerDiv>
248225
<Footer />
249226
<Back2Top
@@ -270,4 +247,4 @@ const mapStateToProps = (state: any) => ({
270247
});
271248

272249
// @ts-ignore
273-
export default connect(mapStateToProps)(withRouter(App)); // property 'strings' is missing in type
250+
export default connect(mapStateToProps)(withRouter(App)); // property 'strings' is missing in type

0 commit comments

Comments
 (0)