fix(settings): experimental flashing on sidebar search

This commit is contained in:
David Ralph
2026-02-02 14:10:27 +00:00
parent 3fc5d736c8
commit bbaf4de7f4
3 changed files with 3 additions and 11 deletions

View File

@@ -1,5 +0,0 @@
{
"permissions": {
"allow": ["Bash(node scripts/updatetranslations.cjs:*)"]
}
}

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
# Directories # Directories
node_modules/ node_modules/
.history/ .history/
.claude/
.vscode/ .vscode/
build/ build/
.idea/ .idea/

View File

@@ -1,15 +1,11 @@
import { memo, useState, useEffect } from 'react'; import { memo } from 'react';
import { useT } from 'contexts/TranslationContext'; import { useT } from 'contexts/TranslationContext';
import { Tooltip } from 'components/Elements'; import { Tooltip } from 'components/Elements';
import { getIconComponent, DIVIDER_LABELS } from '../constants/tabConfig'; import { getIconComponent, DIVIDER_LABELS } from '../constants/tabConfig';
function Tab({ label, currentTab, onClick, navbarTab, isCollapsed }) { function Tab({ label, currentTab, onClick, navbarTab, isCollapsed }) {
const t = useT(); const t = useT();
const [isExperimental, setIsExperimental] = useState(true); const isExperimental = localStorage.getItem('experimental') !== 'false';
useEffect(() => {
setIsExperimental(localStorage.getItem('experimental') !== 'false');
}, []);
// Get the icon component for this label (label is already translated) // Get the icon component for this label (label is already translated)
const IconComponent = getIconComponent(label, { getMessage: t }); const IconComponent = getIconComponent(label, { getMessage: t });