Skip to content

Commit

Permalink
Updated logo and header/footer texts
Browse files Browse the repository at this point in the history
  • Loading branch information
paolo7 committed May 3, 2024
1 parent b72f9dd commit 24d0102
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<script>
window.onload = function() {
var domain = window.location.hostname;
var title = "eRegistry";
// If domain is not recognised, default to Tanzania
var title = "eRegistry Tz";
if (window.location.hostname === 'tmh-registry-client.herokuapp.com') {
// Tanzania
title = "eRegistry Tz";
Expand Down
Binary file modified src/assets/tsa-logo-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 23 additions & 16 deletions src/components/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export type Props = {
};

let SiteLogo: string;
// If domain is not recognised, default to Tanzania
SiteLogo = TSALogo;
if (window.location.hostname === 'tmh-registry-client.herokuapp.com') {
// Tanzania
Expand Down Expand Up @@ -87,15 +88,15 @@ const Drawer: React.FC<Props> = (props) => {
// Ghana
return (
<div>The Affordable Mesh Hernia Surgery Initiative is a collaboration between SWIFTSS and
the Ghanaian AMHSI working group. For more information visit
<a href="https://swiftss.org/">www.swiftss.org</a>.</div>
the Ghanaian AMHSI working group. For more information
visit <a href="https://swiftss.org/">www.swiftss.org</a>.</div>
);
} else if (window.location.hostname === 'tmh-registry-client-sl.herokuapp.com') {
// Sierra Leone
return (
<div>The Affordable Mesh Hernia Surgery Initiative is a collaboration between SWIFTSS and
the Sierra Leone AMHSI working group. For more information visit
<a href="https://swiftss.org/">www.swiftss.org</a>.</div>
the Sierra Leone AMHSI working group. For more information
visit <a href="https://swiftss.org/">www.swiftss.org</a>.</div>
);
} else if (window.location.hostname === 'tmh-registry-client-staging.herokuapp.com') {
// Staging site
Expand All @@ -109,9 +110,10 @@ const Drawer: React.FC<Props> = (props) => {
return (
<div>The Tanzania National Mesh Hernia Project is an original collaboration between SWIFTSS
and the TSA (and the forerunner of the Affordable Mesh Hernia Surgery Initiative). For
more information visit <a href="https://swiftss.org/">www.swiftss.org</a>. LOCALHOST</div>
more information visit <a href="https://swiftss.org/">www.swiftss.org</a>.</div>
)
} else {
// If domain is not recognised, default to Tanzania
return (
<div>The Tanzania National Mesh Hernia Project is an original collaboration between SWIFTSS
and the TSA (and the forerunner of the Affordable Mesh Hernia Surgery Initiative). For
Expand All @@ -126,44 +128,49 @@ const Drawer: React.FC<Props> = (props) => {
if (window.location.hostname === 'tmh-registry-client.herokuapp.com') {
// Tanzania
return (
<div>Tanzania National <br />
Mesh Hernia Project <br />
<div>Tanzania National<br />
Mesh Hernia Project<br />
eRegistry</div>
);
} else if (window.location.hostname === 'tmh-registry-client-gh-6a64e51863f6.herokuapp.com') {
// Ghana
return (
<div>AMHSI Ghana <br />
<div>Ghana Affordable<br />
Mesh Hernia Project<br />
eRegistry</div>
);
} else if (window.location.hostname === 'tmh-registry-client-sl.herokuapp.com') {
// Sierra Leone
return (
<div>AMHSI Sierra Leone <br />
<div>Sierra Leone Affordable<br />
Mesh Hernia Project<br />
eRegistry</div>
);
} else if (window.location.hostname === 'tmh-registry-client-staging.herokuapp.com') {
// Staging site
return (
<div>AMHSI <br />
TEST SITE</div>
<div>Affordable Mesh<br />
Hernia Initiative<br />
eRegistry TEST SITE</div>
);
} else if (window.location.hostname === 'localhost') {
// Localhost
return (
<div>eRegistry <br />
LOCALHOST SITE</div>
<div>Tanzania National<br />
Mesh Hernia Project<br />
eRegistry</div>
)
} else {
// If domain is not recognised, default to Tanzania
return (
<div>Tanzania National <br />
Mesh Hernia Project <br />
<div>Tanzania National<br />
Mesh Hernia Project<br />
eRegistry</div>
);
}
};

const headerText= getLocalisedHeaderText();
const headerText = getLocalisedHeaderText();

return (
<Container
Expand Down

0 comments on commit 24d0102

Please sign in to comment.