2025-08-02 15:40:39 +03:00

23 lines
560 B
TypeScript

'use client';
import { BackButton } from './back-button';
import { cn } from '@repo/ui/lib/utils';
import { isTMA } from '@telegram-apps/sdk-react';
type Props = { title: string | undefined };
export function PageHeader(props: Readonly<Props>) {
const isTG = isTMA('simple');
return (
<div
className={cn(
'sticky top-0 z-50 flex h-12 items-center rounded-b-lg bg-transparent font-bold tracking-wide backdrop-blur-md',
isTG ? 'px-4' : 'px-2',
)}
>
{!isTG && <BackButton />}
{props.title}
</div>
);
}