Skip to content

Commit

Permalink
pass the data in a proper prop, don't spread it
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed Dec 16, 2024
1 parent 73a5071 commit 516c59f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dotcom-rendering/src/components/Crossword.importable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Crossword as ReactCrossword } from '@guardian/react-crossword-next';
import type { CrosswordProps } from '@guardian/react-crossword-next';

export const Crossword = (data: CrosswordProps['data']) => (
export const Crossword = ({ data }: { data: CrosswordProps['data'] }) => (
<ReactCrossword data={data} clueMinWidth={150} />
);
2 changes: 1 addition & 1 deletion dotcom-rendering/src/lib/renderElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ export const renderElement = ({
case 'model.dotcomrendering.pageElements.CrosswordElement':
return (
<Island priority="critical" defer={{ until: 'visible' }}>
<Crossword {...element.crossword} />
<Crossword data={element.crossword} />
</Island>
);
case 'model.dotcomrendering.pageElements.AudioBlockElement':
Expand Down

0 comments on commit 516c59f

Please sign in to comment.