🐛 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:
Shinji-Li
2025-10-23 17:53:31 +08:00
committed by GitHub
parent 8d34065833
commit 411f875584
3 changed files with 6 additions and 5 deletions

View File

@@ -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} />

View File

@@ -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} />

View File

@@ -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);
}