Skip to content

Commit

Permalink
whitelabel assets to env
Browse files Browse the repository at this point in the history
  • Loading branch information
arpancodes committed Sep 29, 2021
1 parent 0030668 commit 77c3ddd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
8 changes: 7 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@
REACT_APP_TITLE=Corona Corona
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/ksdma_logo.png
REACT_APP_GITHUB_URL=https://github.com/coronasafe
REACT_APP_COVER_IMAGE_ALT=https://cdn.coronasafe.network/ksdma_logo.webp
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_DASHBOARD_URL=http://dashboard.coronasafe.network/
REACT_APP_LIGHT_LOGO=https://cdn.coronasafe.network/light-logo.svg
REACT_APP_BLACK_LOGO=https://cdn.coronasafe.network/black-logo.svg
2 changes: 1 addition & 1 deletion src/Components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const LoginPage = (props: any) => {
<div className="pl-1/5">
<a href={"/"}>
<img
src="https://cdn.coronasafe.network/light-logo.svg"
src={process.env.REACT_APP_LIGHT_LOGO}
className="h-8 w-auto"
alt="care logo"
/>{" "}
Expand Down
11 changes: 3 additions & 8 deletions src/Components/Shifting/ShiftDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,7 @@ export default function ShiftDetails(props: { id: string }) {
<div id="section-to-print" className="print bg-white ">
<div>
{data.is_kasp && (
<img
alt="logo"
src="https://cdn.coronasafe.network/header_logo.png"
/>
<img alt="logo" src={process.env.REACT_APP_HEADER_LOGO} />
)}
</div>
<div className="mx-20 p-4">
Expand Down Expand Up @@ -535,9 +532,7 @@ export default function ShiftDetails(props: { id: string }) {
<div>
<div className="">
<QRCode
value={
"https://care.coronasafe.network/shifting/" + data.id
}
value={`https://${process.env.REACT_APP_DEPLOYED_URL}/shifting/ data.id`}
/>
</div>
</div>
Expand All @@ -552,7 +547,7 @@ export default function ShiftDetails(props: { id: string }) {
Auto Generated for Care
</div>
<div className="font-xs font-gray-600 text-center font-mono">
care.coronasafe.network/shifting/{data.id}
{process.env.REACT_APP_DEPLOYED_URL}/shifting/{data.id}
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/Router/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ import AssetManage from "../Components/Assets/AssetManage";
import { DailyRoundListDetails } from "../Components/Patient/DailyRoundListDetails";

const get = require("lodash.get");
const img = "https://cdn.coronasafe.network/light-logo.svg";
const logoBlack = "https://cdn.coronasafe.network/black-logo.svg";
const img = process.env.REACT_APP_LIGHT_LOGO;
const logoBlack = process.env.REACT_APP_BLACK_LOGO;

const routes = {
"/critical_care_ventilator": () => (
Expand Down Expand Up @@ -488,7 +488,7 @@ const AppRouter = (props: any) => {
<NotificationsList />
<a
key="dashboard"
href="http://dashboard.coronasafe.network/"
href={process.env.REACT_APP_DASHBOARD_URL}
className="mt-2 group flex w-full items-center px-2 py-2 text-base leading-5 font-medium text-primary-300 rounded-md hover:text-white hover:bg-primary-700 focus:outline-none focus:bg-primary-900 transition ease-in-out duration-150"
>
<i className="fas fa-tachometer-alt text-primary-400 mr-3 text-md group-hover:text-primary-300 group-focus:text-primary-300 transition ease-in-out duration-150"></i>
Expand Down Expand Up @@ -569,7 +569,7 @@ const AppRouter = (props: any) => {
<NotificationsList />
<a
key="dashboard"
href="http://dashboard.coronasafe.network/"
href={process.env.REACT_APP_DASHBOARD_URL}
target="_blank"
rel="noreferrer"
className="mt-2 group flex w-full items-center px-2 py-2 text-base leading-5 font-medium text-primary-300 rounded-md hover:text-white hover:bg-primary-700 focus:outline-none focus:bg-primary-900 transition ease-in-out duration-150"
Expand Down
2 changes: 1 addition & 1 deletion src/Router/SessionRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const SessionRouter = (props: any) => {
<div className="mx-auto p-2">
<img
className="h-20"
src="https://cdn.coronasafe.network/ksdma_logo.webp"
src={process.env.REACT_APP_COVER_IMAGE_ALT}
alt="Care Logo"
/>
</div>
Expand Down

0 comments on commit 77c3ddd

Please sign in to comment.