mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 14:42:31 +00:00
11 lines
367 B
TypeScript
11 lines
367 B
TypeScript
|
'use client';
|
||
|
|
||
|
import { useSearchParams } from 'next/navigation';
|
||
|
import { Fragment } from 'react';
|
||
|
|
||
|
// Ensure children are re-rendered when the search query changes
|
||
|
export default function ChildrenWrapper({ children }: { children: React.ReactNode }) {
|
||
|
const searchParams = useSearchParams();
|
||
|
return <Fragment key={searchParams.get('q')}>{children}</Fragment>;
|
||
|
}
|