This pull request fixes an issue with the theme loading in the DarkModeDropdown component. Previously, the useEffect hook was used to set the document element based on the localStorage theme. However, this caused a flickering issue when the theme was changed. This PR removes the useEffect hook and instead sets the theme directly in the script tag in the Document component. This ensures that the theme is loaded earlier and avoids the flickering issue.
This pull request fixes an issue with the theme loading in the DarkModeDropdown component. Previously, the useEffect hook was used to set the document element based on the localStorage theme. However, this caused a flickering issue when the theme was changed. This PR removes the useEffect hook and instead sets the theme directly in the script tag in the Document component. This ensures that the theme is loaded earlier and avoids the flickering issue.
^ generated with copilot