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

Migrate ActionCard.tsx to tailwind #14243

Closed
wants to merge 1 commit into from

Conversation

yun-chiao
Copy link
Contributor

Description

  • Wrapped the ActionCard inside CentralActionCard in eth.tsx with a Box to ensure parameters like sx are correctly passed down.
  • Migrated className to Tailwind CSS.
  • Replaced all components and types from @chakra-ui/react.

Note

I did not replace useColorModeValue with the useColorModeValue from @/hooks/useColorModeValue because I encountered some strange issues.

For example:

const descriptionColor = useColorModeValue(
  "lightmode",
  "darkmode"
)

When using descriptionColor as a className:

<p className={`${descriptionColor}`}></p>

On the first render, it always gets "darkmode", but when I console.log(descriptionColor), it consistently returns "lightmode".

After doing some debugging inside @/hooks/useColorModeValue, I suspect it is related to the theme being null on the initial render, which causes the conditional check to fail and return "darkmode". However, I am unsure why console.log(descriptionColor) which would be "lightmode" and the actual descriptionColor applied to the CSS behave inconsistently.

Snapshoot

localhost


截圖 2024-10-26 上午3 10 05
截圖 2024-10-26 上午3 10 23

https://ethereum.org/

截圖 2024-10-26 上午3 10 58 截圖 2024-10-26 上午3 10 53

Related Issue

#13946

Copy link

netlify bot commented Oct 25, 2024

Deploy Preview for ethereumorg failed.

Name Link
🔨 Latest commit 35163fb
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/671bedcc9099890008c6b9fd

@yun-chiao yun-chiao closed this Oct 25, 2024
@github-actions github-actions bot added the abandoned This has been abandoned or will not be implemented label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned This has been abandoned or will not be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant