feat(subplebbit): add automatic theme based on nsfw or sfw tags

This commit is contained in:
Tom (plebeius.eth)
2024-06-17 12:17:36 +02:00
parent 77ccf0c849
commit 22c1acdd3d
20 changed files with 189 additions and 87 deletions
@@ -65,8 +65,12 @@ const CheckForUpdates = () => {
const Style = () => {
const [theme, setTheme] = useTheme();
const handleThemeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
setTheme(e.target.value);
};
return (
<select className={styles.themeSettings} value={theme} onChange={(e) => setTheme(e.target.value)}>
<select className={styles.themeSettings} value={theme} onChange={handleThemeChange}>
<option value='yotsuba'>Yotsuba</option>
<option value='yotsuba-b'>Yotsuba B</option>
<option value='futaba'>Futaba</option>