Skip to content

fix: knock provider theme #566

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: main
Choose a base branch
from
Open

Conversation

jpvalery
Copy link
Contributor

@jpvalery jpvalery commented Jun 4, 2025

Description

This improves the KnockProvider to follow the theme

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation, if necessary.
  • I have added tests that prove my fix is effective or my feature works.
  • New and existing tests pass locally with my changes.

Screenshots (if applicable)

CleanShot 2025-06-04 at 15 52 37
CleanShot 2025-06-04 at 15 55 52
CleanShot 2025-06-04 at 15 56 07

Copy link

vercel bot commented Jun 4, 2025

@jpvalery is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@QuentinFrc QuentinFrc left a comment

Choose a reason for hiding this comment

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

We should use resolvedTheme from useTheme hook no ?

@jpvalery
Copy link
Contributor Author

We should use resolvedTheme from useTheme hook no ?

Can you share a snippet of what you would do? I'm not sure to follow?

Comment on lines +24 to +25
const { theme: rawTheme } = useTheme();
const theme = rawTheme === 'dark' ? 'dark' : 'light';
Copy link
Contributor

Choose a reason for hiding this comment

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

const { resolvedTheme } = useTheme(); // Returns same as theme value but resolve system to the corresponding value

useTheme in next-themes api doc

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