mirror of
https://github.com/GeekyWizKid/writing-helper.git
synced 2026-04-27 07:15:58 +03:00
[PR #1] [MERGED] 修复: 解决服务器与客户端渲染不匹配导致的水合错误 #7
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/writing-helper#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/GeekyWizKid/writing-helper/pull/1
Author: @fzlzjerry
Created: 3/3/2025
Status: ✅ Merged
Merged: 3/3/2025
Merged by: @GeekyWizKid
Base:
main← Head:fix-hydration-error📝 Commits (1)
1322119修复: 解决服务器与客户端渲染不匹配导致的水合错误📊 Changes
2 files changed (+2 additions, -7 deletions)
View changed files
📝
src/app/globals.css(+1 -6)📝
src/app/layout.tsx(+1 -1)📄 Description
This pull request includes changes to the theme handling in the application to ensure a consistent theme between the server and client. The most important changes are:
Theme consistency:
src/app/globals.css: Removed the media query forprefers-color-schemeto ensure the same theme is used on both the server and client.src/app/layout.tsx: Updated thehtmlelement to explicitly set thedata-themeattribute to "light" and thecolorSchemestyle to "light".🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.