mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🐛 fix: loadmore not work & navbar not show in pwa (#9855)
fix: fix pwa loadmore not work & navbar not show in pwa
This commit is contained in:
@@ -29,12 +29,12 @@ const Client = memo<{ mobile?: boolean }>(() => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Title more={t('home.more')} moreLink={'/discover/assistant'}>
|
||||
<Title more={t('home.more')} moreLink={'/assistant'}>
|
||||
{t('home.featuredAssistants')}
|
||||
</Title>
|
||||
<AssistantList data={assistantList.items} rows={4} />
|
||||
<div />
|
||||
<Title more={t('home.more')} moreLink={'/discover/mcp'}>
|
||||
<Title more={t('home.more')} moreLink={'/mcp'}>
|
||||
{t('home.featuredTools')}
|
||||
</Title>
|
||||
<McpList data={mcpList.items} rows={4} />
|
||||
|
||||
@@ -29,12 +29,12 @@ const HomePage = memo<{ mobile?: boolean }>(() => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Title more={t('home.more')} moreLink={'/discover/assistant'}>
|
||||
<Title more={t('home.more')} moreLink={'/assistant'}>
|
||||
{t('home.featuredAssistants')}
|
||||
</Title>
|
||||
<AssistantList data={assistantList.items} rows={4} />
|
||||
<div />
|
||||
<Title more={t('home.more')} moreLink={'/discover/mcp'}>
|
||||
<Title more={t('home.more')} moreLink={'/mcp'}>
|
||||
{t('home.featuredTools')}
|
||||
</Title>
|
||||
<McpList data={mcpList.items} rows={4} />
|
||||
|
||||
@@ -57,7 +57,8 @@ const UrlSynchronizer = () => {
|
||||
|
||||
// Update browser URL when location changes
|
||||
useEffect(() => {
|
||||
const newUrl = `/discover${location.pathname}${location.search}`;
|
||||
const normalizedPath = location.pathname === '/' ? '' : location.pathname;
|
||||
const newUrl = `/discover${normalizedPath}${location.search}`;
|
||||
if (window.location.pathname + window.location.search !== newUrl) {
|
||||
window.history.replaceState({}, '', newUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user