Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f4e3ad7

Browse files
committed
docs: banner fix
1 parent 2ec160e commit f4e3ad7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

‎website/src/theme/DocSidebar/index.js‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ import React, { useEffect, useRef } from 'react';
22
import { useColorMode } from '@docusaurus/theme-common';
33
import OriginalDocSidebar from '@theme-original/DocSidebar';
44

5-
function reload() {
6-
if (typeof ethicalads !== 'undefined') {
7-
ethicalads.reload();
8-
} else {
9-
setTimeout(reload, 300);
10-
}
11-
}
12-
135
export default function DocSidebar(props) {
146
const bannerRef = useRef();
157
const { colorMode } = useColorMode();
@@ -24,7 +16,10 @@ export default function DocSidebar(props) {
2416
banner.setAttribute('data-ea-publisher', 'react-chartjs-2jsorg');
2517
banner.setAttribute('data-ea-type', 'image');
2618
document.querySelector('.theme-doc-sidebar-menu')?.parentElement?.appendChild(banner);
27-
reload();
19+
20+
if (typeof ethicalads !== 'undefined') {
21+
ethicalads.reload();
22+
}
2823
}
2924
}, []);
3025

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /