2 Commits
Author SHA1 Message Date
yudeandGitHub 7da9e16b63 Merge pull request #7 from underecho/master
ページのリロード時に変更ボタンがずれる
2021-07-15 21:23:20 +09:00
under 8f58012cdb ページのリロード時に変更ボタンがずれる
close #6
2021-07-15 14:42:52 +09:00
+2 -2
View File
@@ -22,11 +22,11 @@ const ThemeSelector = (props) => {
};
return (
<button className="inline-flex rounded-md border border-gray-300 dark:border-gray-800 shadow-sm px-2 bg-white font-medium text-gray-700 hover:bg-gray-50 dark:bg-gray-700 dark:text-white my-3 py-1 text-2xl focus:outline-none" onClick={switchTheme}>
{theme === 'light' ? (
{theme !== undefined && (theme === "light" ? (
<FontAwesomeIcon icon={faMoon} className="w-10 h-7" />
) : (
<FontAwesomeIcon icon={faSun} className="w-10 h-7" />
)}
))}
</button>
)
}