feat: hromadné editace
This commit is contained in:
1 parent
8fa7f601f2
commit
bc85a37fc0
18 files changed
+825
-18
No files matched your search
@@ -25,6 +25,10 @@ export default function Header() {
|
||||
|
||||
const effectiveDark = settings?.effectiveDark ?? false;
|
||||
|
||||
/** Podstránka (doplnění údajů ve statistikách) nechá zvýrazněnou svou nadřazenou položku. */
|
||||
const isActive = (url: string) =>
|
||||
location.pathname === url || (url !== DEN_URL && location.pathname.startsWith(`${url}/`));
|
||||
|
||||
const toggleTheme = () => {
|
||||
const next: ThemePreference = effectiveDark ? 'light' : 'dark';
|
||||
settings?.setThemePreference(next);
|
||||
@@ -39,7 +43,7 @@ export default function Header() {
|
||||
{NAV_ITEMS.map(item => (
|
||||
<button
|
||||
key={item.url}
|
||||
className={`nav-pill ${location.pathname === item.url ? 'active' : ''}`}
|
||||
className={`nav-pill ${isActive(item.url) ? 'active' : ''}`}
|
||||
onClick={() => navigate(item.url)}
|
||||
>
|
||||
{item.label}
|
||||
|
||||
Reference in new issue
Block a user