-
Notifications
You must be signed in to change notification settings - Fork 50
Testnet banner #1360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testnet banner #1360
Conversation
✅ Deploy Preview for kleros-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
web/src/layout/Header/index.tsx
Outdated
| <Container> | ||
| <DesktopHeader /> | ||
| <MobileHeader /> | ||
| {process.env.REACT_APP_DEPLOYMENT === "testnet" && <Banner />} |
There was a problem hiding this comment.
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
web/src/layout/Header/index.tsx
Outdated
| <Container> | ||
| <DesktopHeader /> | ||
| <MobileHeader /> | ||
| {process.env.REACT_APP_DEPLOYMENT === "testnet" && <TestnetBanner />} |
There was a problem hiding this comment.
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
| {process.env.REACT_APP_DEPLOYMENT === "testnet" && <TestnetBanner />} | |
| {process.env.REACT_APP_DEPLOYMENT === "testnet" ? <TestnetBanner /> : null} |
|
Code Climate has analyzed commit 7451435 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
alcercu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
closes #1358 |

closes #1358
PR-Codex overview
Detailed summary
TestnetBannerto display a banner for testnet release.Headercomponent to conditionally render theTestnetBannerbased on theREACT_APP_DEPLOYMENTenvironment variable.HeaderContainerto wrap theDesktopHeaderandMobileHeadercomponents in theHeadercomponent.Containercomponent in theHeadercomponent.Wrapperto wrap theContainercomponent in theNavBarcomponent.Containercomponent in theNavBarcomponent.