Refactor ProPage and improve back button logic

- Removed the unused PageHeader component from ProPage for a cleaner layout.
- Updated the isRootLevelPage function to enhance path exclusion logic, ensuring it correctly identifies root level pages.
This commit is contained in:
vchikalkin 2025-09-19 16:21:12 +03:00
parent 3e0ac818f2
commit 1f168df095
2 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,5 @@
import { getSubscription, getSubscriptionPrices } from '@/actions/api/subscriptions';
import { getSessionUser } from '@/actions/session';
import { PageHeader } from '@/components/navigation';
import { TryFreeButton } from '@/components/subscription';
import { env } from '@/config/env';
import { Enum_Subscriptionprice_Period as SubscriptionPricePeriod } from '@repo/graphql/types';
@ -29,7 +28,6 @@ export default async function ProPage() {
return (
<div className="min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-100 dark:from-slate-900 dark:via-slate-800 dark:to-slate-900">
<PageHeader title="" />
{/* Hero Section */}
<div className="px-4 py-8 sm:px-6 lg:px-8">
<div className="mx-auto max-w-4xl text-center">

View File

@ -34,7 +34,7 @@ export function useBackButton() {
}
function isRootLevelPage(pathname: string) {
if (exclude.includes(pathname)) return false;
if (exclude.some((path) => pathname.includes(path))) return false;
return pathname.split('/').filter(Boolean).length === 1;
}