Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | import { useDialog } from '@/context/dialog';
import { default as CButtons } from '@/components/ControlButtons';
import { CH } from '@code-hike/mdx/dist/components.cjs.js';
import dynamic from 'next/dynamic';
import VisibilityManager from '@/components/VisibilityManager';
import Loading from '@/components/RenderManager/Loading';
import Image from 'next/image';
const Adsense = dynamic(() => import('@/components/GoogleAdsense'), { ssr: false, loading: () => <Loading /> });
const GoogleAdsense = () => {
return (
<VisibilityManager hideOnDesktop hideOnTablet>
<div
style={{
display: 'grid',
margin: '0 auto',
minHeight: 'auto',
overflow: 'hidden',
}}
>
<Adsense slot="6172794554" />
</div>
</VisibilityManager>
);
};
const DateComponent = dynamic(() => import('@/components/Date'), {
ssr: false,
loading: () => <Loading />,
});
const ControlButtons = () => {
const { dispatch } = useDialog();
const closeHandler = () => dispatch({ type: 'close' });
return <CButtons disabled withPadding onClickClose={closeHandler} onClickMinimise={closeHandler} />;
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const components: Record<string, any> = {
CH,
ControlButtons,
Date: DateComponent,
GoogleAdsense,
Image,
};
|