added deploy watch, pull script. minor refactors
This commit is contained in:
@@ -15,16 +15,15 @@ const ThemeSwitch = () => {
|
||||
|
||||
if (!mounted) return null
|
||||
|
||||
const next = () => {
|
||||
const i = themes.indexOf(theme as (typeof themes)[number])
|
||||
setTheme(themes[(i + 1) % themes.length])
|
||||
}
|
||||
const nextTheme = themes[(themes.indexOf(theme as (typeof themes)[number]) + 1) % themes.length]
|
||||
const next = () => setTheme(nextTheme)
|
||||
const label = `Theme: ${theme}. Click to switch to ${nextTheme}.`
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={next}
|
||||
aria-label={`Theme: ${theme}`}
|
||||
title={`Theme: ${theme}`}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
top: 'var(--space-4)',
|
||||
|
||||
Reference in New Issue
Block a user