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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Turnstile theme discrepany #3189

Merged
merged 1 commit into from Oct 28, 2022
Merged

Fix Turnstile theme discrepany #3189

merged 1 commit into from Oct 28, 2022

Conversation

ollfkaih
Copy link
Contributor

@ollfkaih ollfkaih commented Oct 27, 2022

Couple of minor issues:

  • The light version seems to be loaded before being replaced when running with csr (not an issue with ssr).
  • When switching themes, the Turnstile widget remains the old theme (I don't know how to cascade this馃し).

Closes webkom/lego#3036

@ollfkaih ollfkaih changed the title Fix theme discrepany Fix Turnstile theme discrepany Oct 27, 2022
@github-actions github-actions bot added the review-needed Pull requests that need review label Oct 27, 2022
@ollfkaih ollfkaih added the bug-fix Pull requests that fix a bug label Oct 27, 2022
@ivarnakken ivarnakken added the small-fix Pull requests that fix something small label Oct 27, 2022
Copy link
Member

@LudvigHz LudvigHz left a comment

Choose a reason for hiding this comment

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

LGTM 馃挴

Yeah, the theme changing is not perfect here, just due to the way we handle the theme stuff. To change the theme dynamically we would ideally store it in redux or a context or something and use that in the component to force a re-render. Since the component won't re-render when we change the theme here.

I am planning on improving the situation, with also storing the theme in localstorage, so unauthed users don't have their theme reset every time they reload the page 馃檭

@LudvigHz LudvigHz merged commit bf71111 into master Oct 28, 2022
@LudvigHz LudvigHz deleted the turnstile-theme branch October 28, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Pull requests that fix a bug review-needed Pull requests that need review small-fix Pull requests that fix something small
Projects
None yet
3 participants