From 2e731b5e11d05427ebe0d23408efc4afb370e83a Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Fri, 21 Aug 2020 12:14:21 +0530 Subject: [PATCH] conditional ejs for GA and Intercom (#384) --- app/client/public/index.html | 36 ++++++++++--------- .../pages/Applications/ApplicationCard.tsx | 23 ++++++++---- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/app/client/public/index.html b/app/client/public/index.html index 5702864a80..94c2ebdaa3 100755 --- a/app/client/public/index.html +++ b/app/client/public/index.html @@ -16,23 +16,27 @@ transition: all ease-in 0.3s; } - - - + <% } %> + <% if("%REACT_APP_GOOGLE_ANALYTICS_ID%"[0] !== "%") { %> + + + gtag('config', "%REACT_APP_GOOGLE_ANALYTICS_ID%"); + + <% } %> diff --git a/app/client/src/pages/Applications/ApplicationCard.tsx b/app/client/src/pages/Applications/ApplicationCard.tsx index d21e409cfc..06b1c0d821 100644 --- a/app/client/src/pages/Applications/ApplicationCard.tsx +++ b/app/client/src/pages/Applications/ApplicationCard.tsx @@ -4,7 +4,7 @@ import { getApplicationViewerPageURL, BUILDER_PAGE_URL, } from "constants/routes"; -import { Card, Classes } from "@blueprintjs/core"; +import { Card, Classes, HTMLDivProps, ICardProps } from "@blueprintjs/core"; import { ApplicationPayload } from "constants/ReduxActionConstants"; import Button from "components/editorComponents/Button"; import { theme, getColorWithOpacity } from "constants/DefaultTheme"; @@ -19,11 +19,16 @@ import { import { getInitialsAndColorCode, getColorCode } from "utils/AppsmithUtils"; import { ControlIcons } from "icons/ControlIcons"; import history from "utils/history"; +import { omit } from "lodash"; -const NameWrapper = styled.div<{ +type NameWrapperProps = { hasReadPermission: boolean; showOverlay: boolean; -}>` +}; + +const NameWrapper = styled((props: HTMLDivProps & NameWrapperProps) => ( +
+))` ${props => props.showOverlay && ` @@ -81,10 +86,14 @@ const Name = styled.div` letter-spacing: 0.1px; `; -const Wrapper = styled(Card)<{ - hasReadPermission?: boolean; - backgroundColor: string; -}>` +const Wrapper = styled( + ( + props: ICardProps & { + hasReadPermission?: boolean; + backgroundColor: string; + }, + ) => , +)` display: flex; flex-direction: column; justify-content: center;