Skip to content

Commit

Permalink
Merge pull request #117 from contentful/chore/exclude-locale-from-ins…
Browse files Browse the repository at this point in the history
…pector-mode-props

fix: exclude locale from type mapping [NONE}
  • Loading branch information
2wce authored May 16, 2023
2 parents 4d8414e + 9bdb8e6 commit 29be2a9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@ export function useContentfulLiveUpdates<T extends Argument | null | undefined>(
return state.data;
}

type GetInspectorModeProps<T> = (props: {
[K in Exclude<keyof LivePreviewProps, keyof T>]: LivePreviewProps[K];
}) => InspectorModeTags;
type GetInspectorModeProps<T> = (
props: {
[K in Exclude<
keyof Pick<LivePreviewProps, 'entryId' | 'fieldId'>,
keyof T
>]: LivePreviewProps[K];
} & { locale?: string }
) => InspectorModeTags;

/**
* Generates the function to build the required properties for the inspector mode (field tagging)
Expand Down

0 comments on commit 29be2a9

Please sign in to comment.