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]); }, [isSelectModeActive, selectedMangas]);
const triggerGlobalSearchButton = useMemo( const triggerGlobalSearchButton = useMemo(
() => ( () =>
<Box sx={{ p: 2 }}> !!query && (
<Button <Box sx={{ p: 2 }}>
size="large" <Button
component={Link} size="large"
to={AppRoutes.sources.childRoutes.searchAll.path(query)} component={Link}
sx={{ textTransform: 'none', width: '100%' }} to={AppRoutes.sources.childRoutes.searchAll.path(query)}
> sx={{ textTransform: 'none', width: '100%' }}
{t('library.action.label.search_globally', { query })} >
</Button> {t('library.action.label.search_globally', { query })}
</Box> </Button>
), </Box>
),
[query], [query],
); );