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

refactor(page staking): replace styled components with chakra ui #9398

Merged

Conversation

mlCode111
Copy link

Description

This PR replaces styled components with Chakra ui components in page/staking/index.tsx

Related Issue

#9353

@mlCode111 mlCode111 changed the title refactor(page staking): replace styled components with chakra ui refactor(page staking): replace styled components with chakra ui #9353 Feb 4, 2023
@mlCode111 mlCode111 changed the title refactor(page staking): replace styled components with chakra ui #9353 refactor(page staking): replace styled components with chakra ui Feb 4, 2023
@gatsby-cloud
Copy link

gatsby-cloud bot commented Feb 4, 2023

✅ ethereum-org-website-dev deploy preview ready

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

Good start on this one @mlCode111 thanks for the PR!

As part of this migration, we also want to remove the SharedStyledComponents dependency. As you will see, a bunch of components are imported from there (Page, Content, etc). We need to migrate those as well.

Comment on lines 28 to 29
import { Box, Flex, Grid, Heading } from "@chakra-ui/react"
import theme from "../../@chakra-ui/gatsby-plugin/theme"
Copy link
Member

Choose a reason for hiding this comment

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

import order

3rd party imports need to be at the top of the imports, along with react and react-intl

Copy link
Author

@mlCode111 mlCode111 Feb 22, 2023

Choose a reason for hiding this comment

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

Thanks. I updated this in the new commit

return (
<Flex
flex="1 1"
flexBasis={theme.breakpoints.md}
Copy link
Member

Choose a reason for hiding this comment

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

Lets use the following form to access the breakpoint value:

import { useToken } from "@chakra-ui/react"

const ContentContainer = props => {
    const mdBp = useToken("breakpoints", "md")

    ...
}

Copy link
Author

Choose a reason for hiding this comment

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

Also updated in the new commit.

@pettinarip
Copy link
Member

pettinarip commented Feb 15, 2023

Just realized there is also merge conflicts. LMK in case you have problems fixing those :)

@mlCode111 mlCode111 force-pushed the mlCode111/refactor/page-staking-to-chakra branch from e16f237 to 418a6e3 Compare February 22, 2023 02:44
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

Thanks so much for this PR @mlCode111! 🎉

I've refactored a few things on the button dropdown to simplify it a bit.


Be sure to join the discord if you are interested in contributing further to the project or have any questions for the team. And we've just released our 2022 POAPs so remember to claim yours also 🥳!

@pettinarip pettinarip merged commit 2fe9a32 into ethereum:dev Feb 28, 2023
@gitpoap-bot
Copy link

gitpoap-bot bot commented Feb 28, 2023

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

Be sure to join the Ethereum.org discord if you are interested in contributing further to the project or have any questions for the team.

GitPOAP: 2023 Ethereum.org Contributor:

GitPOAP: 2023 Ethereum.org Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@pettinarip
Copy link
Member

@all-contributors please add @mlCode111 for code

@allcontributors
Copy link
Contributor

@pettinarip

I've put up a pull request to add @mlCode111! 🎉

@corwintines corwintines mentioned this pull request Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants