Skip to content

Commit

Permalink
chore: improve demo code
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo committed Sep 13, 2023
1 parent 1a3d7e2 commit ccb951e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/demo/CodeGen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import javascript from "highlight.js/lib/languages/javascript";
import typescript from "highlight.js/lib/languages/typescript";
import hljsVuePlugin from "@highlightjs/vue-plugin";
import { initialize, transform } from "esbuild-wasm";
import va from "@vercel/analytics";
import { track } from "@vercel/analytics";
import { getImportsFromOption } from "./utils/codegen";
Expand Down Expand Up @@ -141,7 +141,7 @@ const messageOpen = ref(false);
let messageTimer;
function trackCopy(from) {
va.track("copy-code", { from });
track("copy-code", { from });
console.log("copied");
}
Expand Down
6 changes: 3 additions & 3 deletions src/demo/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useUrlSearchParams } from "@vueuse/core";
import { use } from "echarts/core";
import { CanvasRenderer, SVGRenderer } from "echarts/renderers";
import { INIT_OPTIONS_KEY } from "../ECharts";
import va from "@vercel/analytics";
import { track } from "@vercel/analytics";
import LogoChart from "./examples/LogoChart";
import BarChart from "./examples/BarChart";
Expand All @@ -31,12 +31,12 @@ provide(INIT_OPTIONS_KEY, initOptions);
const codeOpen = ref(location.hash === "#codegen");
if (codeOpen.value) {
va.track("codegen", { from: "link" });
track("codegen", { from: "link" });
}
function openCodegen() {
codeOpen.value = true;
va.track("codegen", { from: "click" });
track("codegen", { from: "click" });
}
watch(codeOpen, open => {
Expand Down

1 comment on commit ccb951e

@vercel
Copy link

@vercel vercel bot commented on ccb951e Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.