Skip to content

Commit

Permalink
fix(document): 🐛 use children?: any for provideComponents
Browse files Browse the repository at this point in the history
fixes #46. In React 18 typings, FC doesn't have auto children anymore
  • Loading branch information
nibtime committed Jul 15, 2022
1 parent 35d2c74 commit 463c29e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next-safe-middleware/src/document/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ export {
type ProvidedProps = {
trustifyStyles?: boolean;
trustifyScripts?: boolean;
children?: any
};
type Provided = {
Head: React.FC<ProvidedProps>;
NextScript: React.FC<ProvidedProps>;
Head: (props: ProvidedProps) => JSX.Element;
NextScript: (props: ProvidedProps) => JSX.Element;
};

/**
Expand All @@ -64,7 +65,6 @@ type Provided = {
* const initialProps = await getCspInitialProps({
* ctx,
* trustifyStyles: true,
* enhanceAppWithNonce: true
* });
* return initialProps;
* ...
Expand Down

0 comments on commit 463c29e

Please sign in to comment.