-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from microbiomedata/issue-166-dev-warning-banner
Add dev site warning banner; display it on GH Pages site
- Loading branch information
Showing
5 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/components/DevelopmentSiteWarning/DevelopmentSiteWarning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import config from "../../config"; | ||
import Banner from "../Banner/Banner"; | ||
import { IonLabel } from "@ionic/react"; | ||
|
||
const { SHOW_DEV_SITE_WARNING } = config; | ||
|
||
const DevelopmentSiteWarning: React.FC = () => { | ||
if (!SHOW_DEV_SITE_WARNING) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Banner color="warning"> | ||
<IonLabel className="ion-no-margin ion-text-center"> | ||
<b>Development Site</b> Do not enter any real data here. | ||
</IonLabel> | ||
</Banner> | ||
); | ||
}; | ||
|
||
export default DevelopmentSiteWarning; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters