mirror of
https://github.com/vercel/commerce.git
synced 2025-07-19 10:51:23 +00:00
15 lines
373 B
TypeScript
15 lines
373 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>;
|
|
}
|