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

fix: use system theme if there is no preference #1074

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ChaituVR
Copy link
Member

Summary

  • Use system theme if there is theme preference (similar to v1)

Closes: #1073

How to test

  1. Open app in incognito
  2. Switch system settings to use light and dark themes

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

Not sure we want this, it's on purpose to have white as the default theme

Comment on lines +3 to 4
const preferredColor = usePreferredColorScheme();
export function useUserSkin() {
Copy link
Member

Choose a reason for hiding this comment

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

We should always have new line between variable and a function

Suggested change
const preferredColor = usePreferredColorScheme();
export function useUserSkin() {
const preferredColor = usePreferredColorScheme();
export function useUserSkin() {

Copy link
Member Author

@ChaituVR ChaituVR Dec 30, 2024

Choose a reason for hiding this comment

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

We have this in a few other places on this repo, better to add a new eslint rule snapshot-labs/config#27

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.

[BUG] - System Theme not detected
2 participants