'use client'; import { usePathname } from 'next/navigation'; import { ReactNode } from 'react'; import { TOOLS } from '../../constants/tools'; import { theme } from '../../stitches.config'; interface ToolsLayoutProps { children: ReactNode; } export default function ToolsLayout({ children }: ToolsLayoutProps) { const pathname = usePathname(); const toolId = pathname.split('/').at(-1); const tool = TOOLS.find((tool) => tool.id === toolId); return ( <>
{tool?.title} {tool?.description}
{children} ); }