Skip to content

refactor(web): align-debug-component-content #1356

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

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

tractorss
Copy link
Contributor

@tractorss tractorss commented Dec 7, 2023

PR-Codex overview

This PR focuses on improving the styling and adding conditional rendering in the Debug component.

Detailed summary

  • Added padding to the Container component in Debug.tsx.
  • Added a StyledLabel component for consistent styling.
  • Updated the Version component to use the StyledLabel component.
  • Updated the ServicesStatus component to conditionally render the StyledIframe component.
  • Updated the Phase component to conditionally render the StyledLabel component.

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

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit 27e7fd2
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/65787fda8dc67400089b5033
😎 Deploy Preview https://deploy-preview-1356--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.

@@ -54,7 +59,7 @@ const Phase = () => {
const { data: phase } = useSortitionModulePhase({
watch: true,
});
return <>{phase !== undefined && <label>Phase: {Phases[phase]}</label>}</>;
return <>{phase !== undefined && <StyledLabel>Phase: {Phases[phase]}</StyledLabel>}</>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Lately I have been trying to use the following syntax for this situations:

Suggested change
return <>{phase !== undefined && <StyledLabel>Phase: {Phases[phase]}</StyledLabel>}</>;
return (phase !== undefined ? <StyledLabel>Phase: {Phases[phase]}</StyledLabel> : null);

(also, try using the isUndefined function from utils/index.ts)

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

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

See analysis details on SonarCloud

Copy link

codeclimate bot commented Dec 12, 2023

Code Climate has analyzed commit 27e7fd2 and detected 0 issues on this pull request.

View more on Code Climate.

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 12, 2023
Merged via the queue into dev with commit d3fc190 Dec 12, 2023
@jaybuidl jaybuidl added this to the testnet-3 milestone Dec 27, 2023
@jaybuidl jaybuidl deleted the refactor(web)/align-debug-component 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.

3 participants