Skip to content

Commit 94c2d79

Browse files
fix: hide bottom nav in convo and fix dialog text alignment (#701)
1 parent b713daa commit 94c2d79

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

apps/web/src/app/[orgShortcode]/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use client';
22

3+
import { useCurrentConvoId, useOrgShortcode } from '@/src/hooks/use-params';
34
import { ClaimEmailIdentity } from './_components/claim-email-identity';
45
import { RealtimeProvider } from '@/src/providers/realtime-provider';
56
import { NewConvoSheet } from './convo/_components/new-convo-sheet';
67
import { Button } from '@/src/components/shadcn-ui/button';
7-
import { useOrgShortcode } from '@/src/hooks/use-params';
88
import { useIsMobile } from '@/src/hooks/use-is-mobile';
99
import { BottomNav } from './_components/bottom-nav';
1010
import { SpinnerGap } from '@phosphor-icons/react';
@@ -18,6 +18,7 @@ export default function Layout({
1818
children
1919
}: Readonly<{ children: React.ReactNode }>) {
2020
const orgShortcode = useOrgShortcode();
21+
const convoId = useCurrentConvoId();
2122
const isMobile = useIsMobile();
2223

2324
const { data: access, isLoading: accessLoading } =
@@ -75,7 +76,7 @@ export default function Layout({
7576
className={cn('bg-base-1 flex h-full gap-0', isMobile && 'flex-col')}>
7677
{!isMobile && <Sidebar />}
7778
<div className="min-w-0 flex-1 grow overflow-x-auto">{children}</div>
78-
{isMobile && <BottomNav />}
79+
{isMobile && !convoId && <BottomNav />}
7980
{!isMobile && <NewConvoSheet />}
8081
{hasEmailIdentity && !hasEmailIdentity.hasIdentity && (
8182
<ClaimEmailIdentity />

apps/web/src/components/shadcn-ui/alert-dialog.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ const AlertDialogHeader = ({
4848
...props
4949
}: React.HTMLAttributes<HTMLDivElement>) => (
5050
<div
51-
className={cn(
52-
'flex flex-col space-y-2 text-center sm:text-left',
53-
className
54-
)}
51+
className={cn('flex flex-col space-y-2 text-left', className)}
5552
{...props}
5653
/>
5754
);

apps/web/src/components/shadcn-ui/dialog.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ const DialogHeader = ({
5555
...props
5656
}: React.HTMLAttributes<HTMLDivElement>) => (
5757
<div
58-
className={cn(
59-
'flex flex-col space-y-1.5 text-center sm:text-left',
60-
className
61-
)}
58+
className={cn('flex flex-col space-y-1.5 text-left', className)}
6259
{...props}
6360
/>
6461
);

0 commit comments

Comments
 (0)