'use client'; import * as React from 'react'; import { usePathname } from 'next/navigation'; import { cn } from '@/lib/utils'; import { getToolByHref } from '@/lib/tools'; interface AppPageProps { title: string; description?: string; children: React.ReactNode; className?: string; } export function AppPage({ title, description, children, className }: AppPageProps) { const pathname = usePathname(); const firstSegment = pathname.split('/').filter(Boolean)[0]; const tool = getToolByHref(`/${firstSegment ?? ''}`); const Icon = tool?.icon; return (
{description}
)}