From e3f0b7ff4844b1b66738fec4d8c34ecdf8b97be8 Mon Sep 17 00:00:00 2001 From: Rico Date: Tue, 2 Aug 2022 16:15:36 +0800 Subject: [PATCH] react-app, deploy: Add GA ID to config and deployment values refs #349 --- deploy/likedao/templates/react-app.config.yaml | 5 +++++ react-app/src/config/Config.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/deploy/likedao/templates/react-app.config.yaml b/deploy/likedao/templates/react-app.config.yaml index 1d06789f..b31e7e8a 100644 --- a/deploy/likedao/templates/react-app.config.yaml +++ b/deploy/likedao/templates/react-app.config.yaml @@ -35,6 +35,11 @@ data: endpoint: {{ .Values.reactApp.graphqlEndpoint | quote }}, }, authEndpoint: {{ .Values.reactApp.authEndpoint | quote }}, + {{ if .Values.reactApp.googleAnalyticsId }} + googleAnalyticsId: {{ .Values.reactApp.googleAnalyticsId | quote }}, + {{ else }} + googleAnalyticsId: null, + {{ end }} chainLinks: [ {{- range .Values.reactApp.chainLinks }} {{- with .}} diff --git a/react-app/src/config/Config.ts b/react-app/src/config/Config.ts index 2759f02a..4440ed3e 100644 --- a/react-app/src/config/Config.ts +++ b/react-app/src/config/Config.ts @@ -45,6 +45,7 @@ export interface IConfig { endpoint: string; }; authEndpoint: string; + googleAnalyticsId: string | null; chainLinks: ChainLink[]; footerLinks: FooterLinks; } @@ -74,6 +75,7 @@ const defaultConfig: IConfig = { }, authEndpoint: "http://localhost:8080/auth", chainLinks: [], + googleAnalyticsId: null, footerLinks: { githubLink: "https://github.com/likecoin/likedao", tokenLinks: [