Skip to content

Commit

Permalink
🐛 fix: session not found error on mobile (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
shjryan authored Aug 24, 2024
1 parent 1069f37 commit 7e9c15e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MobileNavBar } from '@lobehub/ui';
import { memo, useState } from 'react';

import { useInitAgentConfig } from '@/app/(main)/chat/(workspace)/_layout/useInitAgentConfig';
import { INBOX_SESSION_ID } from '@/const/session';
import { useQueryRoute } from '@/hooks/useQueryRoute';
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';

Expand All @@ -21,7 +22,9 @@ const MobileHeader = memo(() => {
return (
<MobileNavBar
center={<ChatHeaderTitle />}
onBackClick={() => router.push('/chat', { query: { session: '' }, replace: true })}
onBackClick={() =>
router.push('/chat', { query: { session: INBOX_SESSION_ID }, replace: true })
}
right={
<>
<ShareButton mobile open={open} setOpen={setOpen} />
Expand Down

0 comments on commit 7e9c15e

Please sign in to comment.