Scrum4Me/components/shared/set-current-product.tsx
Scrum4Me Agent 7ceefd4409 refactor(PBI-49): strip unused component/file args from debugProps in shared/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 21:33:03 +02:00

16 lines
514 B
TypeScript

'use client'
import { useEffect } from 'react'
import { useProductStore } from '@/stores/product-store'
import { debugProps } from '@/lib/debug'
export function SetCurrentProduct({ id, name }: { id: string; name: string }) {
const { setCurrentProduct, clearCurrentProduct } = useProductStore()
useEffect(() => {
setCurrentProduct(id, name)
return () => clearCurrentProduct()
}, [id, name, setCurrentProduct, clearCurrentProduct])
return <span {...debugProps('set-current-product')} hidden />
}