-
Notifications
You must be signed in to change notification settings - Fork 54
š fix(theme): typo & Cusdis darkāmode sync #21
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,21 @@ | ||
| import { ReactCusdis } from 'react-cusdis' | ||
| import { useRouter } from 'next/router' | ||
| import { useConfig } from '@/contexts/config' | ||
| import { useTheme } from "@/contexts/theme"; | ||
|
|
||
| export default function Cusdis ({ config, post }) { | ||
| const router = useRouter() | ||
| const { link, lang, appearance } = useConfig() | ||
| const { link, lang } = useConfig() | ||
| const { scheme } = useTheme() | ||
|
|
||
| return ( | ||
| <ReactCusdis | ||
| key={`cusdis-${scheme}`} | ||
| attrs={{ | ||
| pageId: post.id, | ||
| pageTitle: post.title, | ||
| pageUrl: link + router.asPath, | ||
| theme: appearance, | ||
| theme: scheme, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see Cusdis does support an
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However, it doesn't work during actual deployment. I have no idea why, but passing 'auto' defaults to the light theme. |
||
| ...config, | ||
| }} | ||
| lang={resolveLang(lang)} | ||
|
|
||
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.