From c902dde118fb536497708bc6d0ec29788a037ec6 Mon Sep 17 00:00:00 2001 From: Tim Chamberlain Date: Tue, 6 Sep 2022 23:08:52 -0500 Subject: [PATCH] cleanups, missing branding bug fixed --- src/App.tsx | 25 +++++++++---------- .../Widgets/Data/CarrierSpendData.tsx | 14 +++++------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9945ab3..f08acce 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -50,8 +50,6 @@ import EntityView from "qqq/pages/entity-view"; import ProcessRun from "qqq/pages/process-run"; import QClient from "qqq/utils/QClient"; import QProcessUtils from "qqq/utils/QProcessUtils"; -import BlueIcon from "../public/nf-icon-blue.png"; -import BlueLogo from "../public/nf-logo-blue.png"; /////////////////////////////////////////////////////////////////////////////////////////////// // define the parts of the nav that are static - before the qqq tables etc get dynamic added // @@ -89,7 +87,6 @@ LicenseInfo.setLicenseKey(process.env.REACT_APP_MATERIAL_UI_LICENSE_KEY); export default function App() { - let logo, icon; const [, setCookie] = useCookies([SESSION_ID_COOKIE_NAME]); const { user, getAccessTokenSilently, getIdTokenClaims, logout, loginWithRedirect, @@ -282,17 +279,19 @@ export default function App() try { const metaData = await QClient.getInstance().loadMetaData(); - setBranding(metaData.branding); - - const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement; - if(favicon) + if (metaData.branding) { - favicon.href = metaData.branding.icon; - } - const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement; - if(appleIcon) - { - appleIcon.href = metaData.branding.icon + setBranding(metaData.branding); + const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement; + const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement; + if (favicon) + { + favicon.href = metaData.branding.icon; + } + if (appleIcon) + { + appleIcon.href = metaData.branding.icon; + } } let profileRoutes = {}; diff --git a/src/qqq/pages/dashboards/Widgets/Data/CarrierSpendData.tsx b/src/qqq/pages/dashboards/Widgets/Data/CarrierSpendData.tsx index 3a7f450..558eb50 100644 --- a/src/qqq/pages/dashboards/Widgets/Data/CarrierSpendData.tsx +++ b/src/qqq/pages/dashboards/Widgets/Data/CarrierSpendData.tsx @@ -40,43 +40,43 @@ const carrierSpendData = { rows: [ { - product: , + product: , value: $140,925, adsSpent: $24,531, refunds: , }, { - product: , + product: , value: $40,600, adsSpent: $9,430, refunds: , }, { - product: , + product: , value: $90,233, adsSpent: $18.30, refunds: , }, { - product: , + product: , value: $80,250, adsSpent: $4,200, refunds: , }, { - product: , + product: , value: $91,300, adsSpent: $7,364, refunds: , }, { - product: , + product: , value: $77,300, adsSpent: $4,064, refunds: , }, { - product: , + product: , value: $130,992, adsSpent: $9,500, refunds: ,