Skip to content

Commit

Permalink
fix: use React 18 and 19 compatible types (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore authored Jan 29, 2025
1 parent ce47002 commit 18b6be0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PrismicNextImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const PrismicNextImage = ({
height,
fallback = null,
...restProps
}: PrismicNextImageProps): JSX.Element => {
}: PrismicNextImageProps): React.JSX.Element => {
if (process.env.NODE_ENV !== "production") {
if (typeof alt === "string" && alt !== "") {
console.warn(
Expand Down
2 changes: 1 addition & 1 deletion src/PrismicNextLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type PrismicNextLinkProps = Omit<
export const PrismicNextLink = React.forwardRef<
HTMLAnchorElement,
PrismicNextLinkProps
>(function PrismicNextLink(props, ref): JSX.Element | null {
>(function PrismicNextLink(props, ref): React.JSX.Element | null {
const { field, document, linkResolver, children, ...restProps } = props;
const {
href: computedHref,
Expand Down
2 changes: 1 addition & 1 deletion src/PrismicPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function PrismicPreview({
repositoryName,
children,
...props
}: PrismicPreviewProps): JSX.Element | Promise<JSX.Element> {
}: PrismicPreviewProps): React.JSX.Element | Promise<React.JSX.Element> {
const toolbarSrc = prismic.getToolbarSrc(repositoryName);
let isDraftMode = false;

Expand Down

0 comments on commit 18b6be0

Please sign in to comment.