Skip to content

Commit

Permalink
Merge pull request #3202 from HHS/update-home-page-text
Browse files Browse the repository at this point in the history
fix: updating home landing page text based on environment
  • Loading branch information
jonnalley authored Dec 11, 2024
2 parents 7fe0a1a + 87c0d22 commit 28cb8f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/mainPage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ afterEach(() => {
});

it("loads", () => {
cy.get("h1").contains("This is the OPRE OPS system prototype");
cy.get("h1").contains("This is a non-production OPS environment");
});

it("clicking on /cans nav takes you to CAN page", () => {
Expand All @@ -22,7 +22,7 @@ it("clicking on /cans nav takes you to CAN page", () => {
});

it("clicking on /portfolio nav while unauthenticated, should keep you at home page.", () => {
cy.get("h1").contains("This is the OPRE OPS system prototype");
cy.get("h1").contains("This is a non-production OPS environment");
cy.url().should("include", "/");
});

Expand Down
14 changes: 10 additions & 4 deletions frontend/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ const Home = () => {
return (
<App>
<div className="display-flex flex-justify-center">
<RoundedBox className="margin-top-4 text-center">
<h1>This is the OPRE OPS system prototype</h1>
<p>⚠️Tread with caution</p>
</RoundedBox>
{!import.meta.env.PROD ? (
<RoundedBox className="margin-top-4 text-center">
<h1>This is a non-production OPS environment</h1>
<p>⚠️This environment is not authorized for certain production datasets. Additionally, this environment may be updated regularly.</p>
</RoundedBox>
) : (
<RoundedBox className="margin-top-4 text-center">
<h1>Welcome to OPS!</h1>
</RoundedBox>
)}
</div>
</App>
);
Expand Down

0 comments on commit 28cb8f5

Please sign in to comment.