commerce/app/search/children-wrapper.tsx
2024-08-01 10:24:50 -07:00

9 lines
301 B
TypeScript

'use client';
import { useSearchParams } from 'next/navigation';
import { Fragment } from 'react';
export default function ChildrenWrapper({ children }: { children: React.ReactNode }) {
const searchParams = useSearchParams();
return <Fragment key={searchParams.get('q')}>{children}</Fragment>;
}