Skip to content
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

feat: Styled StatusPage #1780

Merged
merged 1 commit into from
Jun 13, 2023
Merged

feat: Styled StatusPage #1780

merged 1 commit into from
Jun 13, 2023

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Jun 13, 2023

Cherry-picked from #1707 🍒

@DafyddLlyr DafyddLlyr requested a review from a team June 13, 2023 14:01
@github-actions
Copy link

github-actions bot commented Jun 13, 2023

Removed vultr server and associated DNS entries

@github-actions
Copy link

Lighthouse

buckinhamshire/FOIYNPP testing/canary
performance 0.26 - 0.24 = 0.02 0.34 - 0.3 = 0.04
accessibility 1 - 1 = 0.00 1 - 1 = 0.00
best-practices 1 - 1 = 0.00 0.83 - 0.92 = -0.09
seo 0.88 - 0.89 = -0.01 0.89 - 0.92 = -0.03
pwa 0.7 - 0.7 = 0.00 0.7 - 0.7 = 0.00

@@ -57,7 +50,6 @@ const StatusPage: React.FC<Props> = ({
});

const theme = useTheme();
Copy link
Member

Choose a reason for hiding this comment

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

question: as we're moving away from useStyles() should we also be aiming to move away from useTheme() in favor of sx with the theme callback value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good question!

useTheme() is not deprecated in MUI v5 like useStyles() is, so we can safely continue using it. There are some cases where we likely can't avoid it just now - for example in this component we're using theme to pass a value into another component as a custom prop (so sx with a callback wouldn't work).

If there are places we're using useTheme() just to pass a value where we we could use sx, I'd probably favour sx as being a bit neater and and terser, but I think it's really just a personal preference.

@DafyddLlyr DafyddLlyr merged commit 2712ebc into main Jun 13, 2023
@DafyddLlyr DafyddLlyr deleted the dp/styled-StatusPage branch June 13, 2023 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants