-
Notifications
You must be signed in to change notification settings - Fork 434
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: support PWA on Netlify #79
Conversation
and update dependencies
✅ Deploy Preview for chatgpt-demo-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/layouts/Layout.astro
Outdated
@@ -39,7 +33,6 @@ const { title } = Astro.props; | |||
(function() { | |||
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches | |||
const setting = localStorage.getItem('theme') || 'auto' | |||
if (setting === 'dark' || (prefersDark && setting !== 'light')) | |||
document.documentElement.classList.toggle('dark', true) | |||
if (setting === 'dark' || (prefersDark && setting !== 'light')) document.documentElement.classList.toggle('dark', true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting code may need to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy that. Looks like IDE reformatted the code without my notice. Would be more careful in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy that. Looks like IDE reformatted the code without my notice. Would be more careful in the future.
Fine, Thanks a lot for your work ❤️
fix: support PWA on Netlify (anse-app#79)
implement #71
Description
PWA now works on Netlify
Linked Issues
#71
Additional context