21 |
22 | {location.href}
23 |
24 |
}
26 | type="primary"
27 | onClick={() => {
28 | navigate(import.meta.env.VITE_BASE_HOME_PATH);
29 | }}
30 | >
31 | {t("common.backHome")}
32 |
33 |
34 |
35 | )}
36 | />
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/src/pages/home/components/bar-chart.tsx:
--------------------------------------------------------------------------------
1 | import type { EChartsOption } from "echarts";
2 | import { Card } from "antd";
3 | import ReactECharts from "echarts-for-react";
4 | import { useTranslation } from "react-i18next";
5 |
6 | export default function BarChart() {
7 | const { t } = useTranslation();
8 | const option: EChartsOption = {
9 | title: {
10 | text: "",
11 | subtext: "",
12 | },
13 | xAxis: {
14 | type: "category",
15 | data: [
16 | t("home.directAccess"),
17 | t("home.emailMarketing"),
18 | t("home.affiliateAdvertise"),
19 | t("home.videoAdvertise"),
20 | ],
21 | },
22 | yAxis: {
23 | type: "value",
24 | },
25 | tooltip: {},
26 | series: [
27 | {
28 | type: "bar",
29 | data: [
30 | { value: 335, name: t("home.directAccess") },
31 | { value: 310, name: t("home.emailMarketing") },
32 | { value: 234, name: t("home.affiliateAdvertise") },
33 | { value: 135, name: t("home.videoAdvertise") },
34 | ],
35 | },
36 | ],
37 | };
38 | return (
39 |