Create useEntityHistory.ts with parameterized entity type. Rewrite useComponentHistory, usePieceHistory, useProductHistory as thin backward-compatible wrappers (67→13 LOC each). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
397 B
TypeScript
13 lines
397 B
TypeScript
/**
|
|
* Backward-compatible wrapper around useEntityHistory.
|
|
* Real logic lives in useEntityHistory.ts.
|
|
*/
|
|
import { useEntityHistory, type EntityHistoryActor, type EntityHistoryEntry } from './useEntityHistory'
|
|
|
|
export type ProductHistoryActor = EntityHistoryActor
|
|
export type ProductHistoryEntry = EntityHistoryEntry
|
|
|
|
export function useProductHistory() {
|
|
return useEntityHistory('product')
|
|
}
|