Skip to content

Commit

Permalink
feat(sdk-analytics) clean
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra committed Dec 11, 2024
1 parent 49cfd7c commit 21796a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions core-web/libs/sdk/analytics/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/rollup:rollup",
"executor": "@nx/rollup:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/sdk/analytics",
"tsConfig": "libs/sdk/analytics/tsconfig.lib.json",
"project": "libs/sdk/analytics/package.json",
"entryFile": "libs/sdk/analytics/src/index.ts",
"external": ["react/jsx-runtime", "@dotcms/client", "react"],
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
"rollupConfig": "@nx/react/plugins/bundle-rollup",
"compiler": "babel",
"assets": [
{
Expand Down
12 changes: 0 additions & 12 deletions examples/nextjs/src/components/content-types/activity.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { useAnalyticsTracker } from "@dotcms/analytics";
import Image from "next/image";
import Link from "next/link";

function Activity({ title, description, image, urlTitle }) {
const { track } = useAnalyticsTracker();

const handleClick = () => {
track("btn-click", {
title,
buttonText: "Link to detail",
urlTitle,
});
};

return (
<article className="p-4 overflow-hidden bg-white rounded shadow-lg">
{image && (
Expand All @@ -30,7 +19,6 @@ function Activity({ title, description, image, urlTitle }) {
</div>
<div className="px-6 pt-4 pb-2">
<Link
onClick={handleClick}
href={`/activities/${urlTitle || "#"}`}
className="inline-block px-4 py-2 font-bold text-white bg-purple-500 rounded-full hover:bg-purple-700"
>
Expand Down

0 comments on commit 21796a0

Please sign in to comment.