11 lines
389 B
TypeScript
11 lines
389 B
TypeScript
import { useFormDraft } from './useFormDraft';
|
|
|
|
const PREFIX = 'skatespots:lab-draft:';
|
|
|
|
/**
|
|
* Autosave a Lab profile form. Thin wrapper over the shared `useFormDraft` —
|
|
* kept as a named export so the existing Lab call sites don't change.
|
|
*/
|
|
export function useLabDraft<T>(key: string, snapshot: T, apply: (draft: T) => void) {
|
|
return useFormDraft(PREFIX, key, snapshot, apply);
|
|
}
|