diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2bafaf7..805a538 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -42,7 +42,7 @@ export default function RootLayout({ return ( - +
{children} diff --git a/src/components/YM/YMClick.tsx b/src/components/YM/YMClick.tsx index dfb0b45..06945fa 100644 --- a/src/components/YM/YMClick.tsx +++ b/src/components/YM/YMClick.tsx @@ -12,12 +12,16 @@ export interface IYMClickProps extends HTMLAttributes { export const YMClick: FC = ({ metrik_id, name, child = "", type = 'link', link = "/", target = "", styleNest= "", ...rest }) => { + const enabled = false + + const onclickString = `ym(${metrik_id},'reachGoal','${name}')`; + if(type === 'button'){ return (
+ onclick="${enabled ? onclickString : ""}"> ${child} `}}>
@@ -30,7 +34,7 @@ export const YMClick: FC = ({ metrik_id, name, child = "", type = __html: /*html */` + onclick="${enabled ? onclickString : ""}" ${target ? 'target="' + target + '"' : ''}> ${child} `}}>