fix: buttons not working
This commit is contained in:
@@ -728,10 +728,10 @@ function App() {
|
||||
return;
|
||||
}
|
||||
setIsDirty(true);
|
||||
const updatedConfig = config.filter((item) => item.id !== entryId);
|
||||
setConfig(updatedConfig);
|
||||
setStatus('Eintrag gelöscht!');
|
||||
setTimeout(() => setStatus(''), 3000);
|
||||
await persistConfigUpdate(
|
||||
(prev) => prev.filter((item) => item.id !== entryId),
|
||||
'Eintrag gelöscht!'
|
||||
);
|
||||
};
|
||||
|
||||
const hideEntry = async (entryId) => {
|
||||
|
||||
@@ -38,12 +38,20 @@ const DashboardView = ({
|
||||
return;
|
||||
}
|
||||
const row = document.querySelector(`[data-store-row="${focusedStoreId}"]`);
|
||||
if (row) {
|
||||
row.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
row.classList.add('ring-2', 'ring-blue-400');
|
||||
setTimeout(() => row.classList.remove('ring-2', 'ring-blue-400'), 1500);
|
||||
if (!row) {
|
||||
onClearFocus();
|
||||
return;
|
||||
}
|
||||
onClearFocus();
|
||||
row.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
row.classList.add('ring-2', 'ring-blue-400', 'bg-yellow-100');
|
||||
const timeout = setTimeout(() => {
|
||||
row.classList.remove('ring-2', 'ring-blue-400', 'bg-yellow-100');
|
||||
onClearFocus();
|
||||
}, 3000);
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
row.classList.remove('ring-2', 'ring-blue-400', 'bg-yellow-100');
|
||||
};
|
||||
}, [focusedStoreId, onClearFocus]);
|
||||
const {
|
||||
error: notificationError,
|
||||
@@ -176,8 +184,8 @@ const DashboardView = ({
|
||||
</div>
|
||||
<button
|
||||
onClick={() => onStoreSelect(store)}
|
||||
disabled={blockedByNoPickups}
|
||||
className="bg-blue-50 hover:bg-blue-100 text-blue-600 border border-blue-200 px-3 py-1.5 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-300 disabled:opacity-60"
|
||||
title={blockedByNoPickups ? 'Keine Pickups – automatisch verborgen' : undefined}
|
||||
className="bg-blue-50 hover:bg-blue-100 text-blue-600 border border-blue-200 px-3 py-1.5 rounded text-sm focus:outline-none focus:ring-2 focus:ring-blue-300"
|
||||
>
|
||||
{isVisible ? 'Zur Liste springen' : 'Hinzufügen'}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user