Fix 1ds banner (#4451)
This commit is contained in:
Родитель
4b942c9fb9
Коммит
0108755871
|
@ -0,0 +1,14 @@
|
|||
import type { WrapperProps } from "@docusaurus/types";
|
||||
import Navbar from "@theme-original/Navbar";
|
||||
import type NavbarType from "@theme/Navbar";
|
||||
|
||||
type Props = WrapperProps<typeof NavbarType>;
|
||||
|
||||
export default function NavbarWrapper(props: Props) {
|
||||
return (
|
||||
<>
|
||||
<div id="cookie-banner"></div>
|
||||
<Navbar {...props} />
|
||||
</>
|
||||
);
|
||||
}
|
|
@ -6,7 +6,7 @@ let siteConsent = null;
|
|||
WcpConsent &&
|
||||
WcpConsent.init("en-US", "cookie-banner", (err, _siteConsent) => {
|
||||
if (err != undefined) {
|
||||
return error;
|
||||
console.log("Error initializing WcpConsent: " + err);
|
||||
} else {
|
||||
siteConsent = _siteConsent; //siteConsent is used to get the current consent
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче