Skip to content

Commit

Permalink
fix: type for link component in SettingsContextProps (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio authored Aug 24, 2024
1 parent 1ca35e2 commit d9dcec0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-pumas-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@headstartwp/core": patch
---

Fix TS type for link component in SettingsContextProps
4 changes: 2 additions & 2 deletions packages/core/src/react/provider/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactNode } from 'react';
import React from 'react';
import type { HeadlessConfig } from '../../types';
import type { IImageBlock } from '../blocks/ImageBlock';

export type SettingsContextProps = {
linkComponent?: ReactNode;
linkComponent?: React.FC<any>;
imageComponent?: React.FC<IImageBlock>;
} & HeadlessConfig;

Expand Down
1 change: 0 additions & 1 deletion projects/wp-nextjs-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const RootLayout = async ({

const settings: SettingsContextProps = {
...config,
// @ts-expect-error
linkComponent: Link,
};

Expand Down
1 change: 0 additions & 1 deletion projects/wp-nextjs/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const MyApp = ({ Component, pageProps }: AppProps<MyAppProps>) => {
revalidateOnMount: false,
}}
settings={{
// @ts-expect-error
linkComponent: Link,
}}
useYoastHtml
Expand Down

0 comments on commit d9dcec0

Please sign in to comment.