Skip to content

fix: Removed unnecessary check in useTheme() #2153

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xsimka
Copy link

@0xsimka 0xsimka commented Apr 2, 2025

What changed? Why?
The if (context === undefined) check in useTheme() was removed. This check was unnecessary because useContext(ThemeContext) never returns undefined—it always provides a value from createContext(). If no provider is found, the default value is used. This change makes the code cleaner and more logical.

Notes to reviewers
This is a minor cleanup to remove redundant logic. No functional changes expected.

How has it been tested?
Checked that the theme logic still works as expected without the unnecessary check.

Have you tested the following pages?

BaseWeb

  • base.org
  • base.org/names
  • base.org/builders
  • base.org/ecosystem
  • base.org/name/jesse
  • base.org/manage-names
  • base.org/resources

BaseDocs

  • docs.base.org
  • docs sub-pages

Copy link

vercel bot commented Apr 2, 2025

@0xsimka is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Apr 2, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@wbnns wbnns added the base web review To be reviewed by the Base web team label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base web review To be reviewed by the Base web team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants