Hide library perform global search button without active search

This commit is contained in:
schroda
2025-05-21 01:18:31 +02:00
parent daeab31121
commit 7ae7c3e768

View File

@@ -170,18 +170,19 @@ export function Library() {
}, [isSelectModeActive, selectedMangas]);
const triggerGlobalSearchButton = useMemo(
() => (
<Box sx={{ p: 2 }}>
<Button
size="large"
component={Link}
to={AppRoutes.sources.childRoutes.searchAll.path(query)}
sx={{ textTransform: 'none', width: '100%' }}
>
{t('library.action.label.search_globally', { query })}
</Button>
</Box>
),
() =>
!!query && (
<Box sx={{ p: 2 }}>
<Button
size="large"
component={Link}
to={AppRoutes.sources.childRoutes.searchAll.path(query)}
sx={{ textTransform: 'none', width: '100%' }}
>
{t('library.action.label.search_globally', { query })}
</Button>
</Box>
),
[query],
);