diff --git a/.env b/.env index dfd7243cc32..7e27e19a0d2 100644 --- a/.env +++ b/.env @@ -4,16 +4,6 @@ REACT_APP_TITLE="CARE" REACT_APP_META_DESCRIPTION="CoronaSafe Network is an open-source public utility designed by a multi-disciplinary team of innovators and volunteers. CoronaSafe Care is a Digital Public Good recognised by United Nations." REACT_APP_COVER_IMAGE=https://cdn.coronasafe.network/care_logo.svg REACT_APP_COVER_IMAGE_ALT=https://cdn.coronasafe.network/care_logo.svg -REACT_APP_GITHUB_URL=https://github.com/coronasafe -REACT_APP_HEADER_LOGO=https://cdn.coronasafe.network/header_logo.png -REACT_APP_DEPLOYED_URL=care.coronasafe.network -REACT_APP_LIGHT_LOGO=https://cdn.coronasafe.network/light-logo.svg -REACT_APP_LIGHT_COLLAPSE_LOGO= -REACT_APP_BLACK_LOGO=https://cdn.coronasafe.network/black-logo.svg -REACT_APP_RECAPTCHA_SITE_KEY=6LdvxuQUAAAAADDWVflgBqyHGfq-xmvNJaToM0pN -REACT_APP_KASP_ENABLED=false -REACT_APP_KASP_STRING=KASP -REACT_APP_KASP_FULL_STRING="Karunya Arogya Suraksha Padhathi" # Dev envs ESLINT_NO_DEV_ERRORS=true \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 223ddccd64f..0747b7a495a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -33,3 +33,11 @@ force = true from = "/*" to = "/index.html" status = 200 + +[[headers]] + for = "/*" + [headers.values] + cache-control = ''' + max-age=0, + no-store''' + diff --git a/public/config.json b/public/config.json index 01c49881256..8a915c55c96 100644 --- a/public/config.json +++ b/public/config.json @@ -1,13 +1,18 @@ { "dashboard_url": "https://dashboard.coronasafe.in", "github_url": "https://github.com/coronasafe", + "coronasafe_url": "https://coronasafe.network?ref=care", "static_header_logo": "https://cdn.coronasafe.network/header_logo.png", "static_light_logo": "https://cdn.coronasafe.network/light-logo.svg", "static_black_logo": "https://cdn.coronasafe.network/black-logo.svg", + "static_dpg_white_logo": "https://digitalpublicgoods.net/wp-content/themes/dpga/images/logo-w.svg", + "static_coronasafe_logo": "https://3451063158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M233b0_JITp4nk0uAFp%2F-M2Dx6gKxOSU45cjfgNX%2F-M2DxFOkMmkPNn0I6U9P%2FCoronasafe-logo.png?alt=media&token=178cc96d-76d9-4e27-9efb-88f3186368e8", "gmaps_api_key": "AIzaSyDsBAc3y7deI5ZO3NtK5GuzKwtUzQNJNUk", + "gov_data_api_key": "579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b", "recaptcha_site_key": "6LdvxuQUAAAAADDWVflgBqyHGfq-xmvNJaToM0pN", "kasp_enabled": false, "kasp_string": "KASP", "kasp_full_string": "Karunya Arogya Suraksha Padhathi", - "state_logo": "https://digitalpublicgoods.net/wp-content/themes/dpga/images/logo.svg" + "sample_format_asset_import": "https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=11JaEhNHdyCHth4YQs_44YaRlP77Rrqe81VSEfg1glko&exportFormat=xlsx", + "sample_format_external_result_import": "https://docs.google.com/spreadsheets/d/17VfgryA6OYSYgtQZeXU9mp7kNvLySeEawvnLBO_1nuE/export?format=csv&id=17VfgryA6OYSYgtQZeXU9mp7kNvLySeEawvnLBO_1nuE" } \ No newline at end of file diff --git a/public/favicon-dark.ico b/public/favicon-dark.ico new file mode 100644 index 00000000000..b1722d8d36b Binary files /dev/null and b/public/favicon-dark.ico differ diff --git a/public/favicon-light.ico b/public/favicon-light.ico new file mode 100644 index 00000000000..c4fddf60349 Binary files /dev/null and b/public/favicon-light.ico differ diff --git a/public/index.html b/public/index.html index 711d4c4e613..dce4c90a2d7 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@ - + - - + + - +
diff --git a/src/App.tsx b/src/App.tsx index 9d2e3da6122..13c46f3886b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import { useDispatch, useSelector } from "react-redux"; import { getConfig, getCurrentUser } from "./Redux/actions"; import { useAbortableEffect, statusType } from "./Common/utils"; import axios from "axios"; +import { HistoryAPIProvider } from "./CAREUI/misc/HistoryAPIProvider"; const Loading = loadable(() => import("./Components/Common/Loading")); @@ -57,6 +58,17 @@ const App: React.FC = () => { [dispatch] ); + useEffect(() => { + const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)"); + const favicon: any = document.querySelector("link[rel~='icon']"); + console.log(favicon); + if (darkThemeMq.matches) { + favicon.href = "/favicon-light.ico"; + } else { + favicon.href = "/favicon-dark.ico"; + } + }, []); + if ( !currentUser || currentUser.isFetching || @@ -68,7 +80,11 @@ const App: React.FC = () => { } if (currentUser?.data) { - return