you can use template instead of layout but the component of template should be client component , you can not access search params in this components directly props of the component