Skip to content

Commit bd1d3bc

Browse files
fix(mobile): hide tab bar on session pages and add safe area padding
- Prevent mobile tab bar from appearing on session detail pages - Add bottom padding to Memories page for iPhone home indicator
1 parent 00bbe99 commit bd1d3bc

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

frontend/src/components/navigation/MobileTabBar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ export const MobileTabBar = memo(function MobileTabBar() {
145145

146146
const isOnRepoSchedules = /^\/repos\/\d+\/schedules$/.test(pathname)
147147
const isRepoMemories = /^\/repos\/\d+\/memories$/.test(pathname)
148-
const isRepoSession = /^\/repos\/\d+\/sessions\/\w+/.test(pathname)
149148
const isMobile = useMobile()
150149
const isRoot = pathname === '/'
151150
const isGlobalSchedules = pathname === '/schedules'
152151
const isRepoDetail = /^\/repos\/\d+$/.test(pathname)
153-
const isInsideRepo = isRepoDetail || isOnRepoSchedules || isRepoMemories || isRepoSession
154-
const allow = isRoot || isGlobalSchedules || isInsideRepo
152+
const isInsideRepo = isRepoDetail || isOnRepoSchedules || isRepoMemories
153+
const isRepoSession = /^\/repos\/\d+\/sessions\/\w+/.test(pathname)
154+
const allow = isRoot || isGlobalSchedules || (isInsideRepo && !isRepoSession)
155155

156156
const repoIdMatch = pathname.match(/^\/repos\/(\d+)/)
157157
const repoId = repoIdMatch ? repoIdMatch[1] : null

frontend/src/pages/Memories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function Memories() {
6969
}
7070

7171
return (
72-
<div className="h-dvh max-h-dvh overflow-hidden bg-gradient-to-br from-background via-background to-background flex flex-col">
72+
<div className="h-dvh max-h-dvh overflow-hidden bg-gradient-to-br from-background via-background to-background flex flex-col pb-[calc(env(safe-area-inset-bottom)+56px)] sm:pb-0">
7373
<Header>
7474
<Header.BackButton to={`/repos/${repoId}`} />
7575
<div className="min-w-0 flex-1 flex justify-center ml-2">
@@ -95,7 +95,7 @@ export function Memories() {
9595
</Header.Actions>
9696
</Header>
9797

98-
<div className="flex-1 overflow-auto p-4 [mask-image:linear-gradient(to_bottom,transparent,black_16px,black)]">
98+
<div className="flex-1 overflow-auto p-4 pb-20 [mask-image:linear-gradient(to_bottom,transparent,black_16px,black)]">
9999
{stats && (
100100
<Card className="mb-6 hidden sm:block">
101101
<CardContent className="p-4">

0 commit comments

Comments
 (0)