Skip to content

Conversation

@tractorss
Copy link
Contributor

@tractorss tractorss commented Dec 9, 2023

closes #1358

PR-Codex overview

Detailed summary

  • Added a new component TestnetBanner to display a banner for testnet release.
  • Modified the Header component to conditionally render the TestnetBanner based on the REACT_APP_DEPLOYMENT environment variable.
  • Created a new styled component HeaderContainer to wrap the DesktopHeader and MobileHeader components in the Header component.
  • Updated the styles of the Container component in the Header component.
  • Added a new styled component Wrapper to wrap the Container component in the NavBar component.
  • Updated the styles of the Container component in the NavBar component.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@netlify
Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit 7451435
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/6579742745de530008a6beb4
😎 Deploy Preview https://deploy-preview-1360--kleros-v2.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

<Container>
<DesktopHeader />
<MobileHeader />
{process.env.REACT_APP_DEPLOYMENT === "testnet" && <Banner />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would change the name from Banner to TestnetBanner

<Container>
<DesktopHeader />
<MobileHeader />
{process.env.REACT_APP_DEPLOYMENT === "testnet" && <TestnetBanner />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I forgot to mention it in the previous comment, let's switch this to the ternary operator too

Suggested change
{process.env.REACT_APP_DEPLOYMENT === "testnet" && <TestnetBanner />}
{process.env.REACT_APP_DEPLOYMENT === "testnet" ? <TestnetBanner /> : null}

@alcercu alcercu enabled auto-merge December 13, 2023 08:04
@alcercu alcercu disabled auto-merge December 13, 2023 08:05
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 7451435 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 1

View more on Code Climate.

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@alcercu alcercu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alcercu alcercu added this pull request to the merge queue Dec 13, 2023
@alcercu
Copy link
Contributor

alcercu commented Dec 13, 2023

closes #1358

Merged via the queue into dev with commit af4323b Dec 13, 2023
@jaybuidl jaybuidl changed the title chore(web): add-testnet-banner Testnet banner Dec 19, 2023
@jaybuidl jaybuidl added this to the testnet-3 milestone Dec 27, 2023
@jaybuidl jaybuidl deleted the chore(web)/testnet-banner branch January 3, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web: Add a banner at the top of the page reminding it's a beta testnet deployment.

4 participants