Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

import { mount } from 'cypress/react18';
import { mount } from 'cypress/react';

// Augment the Cypress namespace to include type definitions for
// your custom command.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@
},
"dependencies": {
"@types/react": "^18.0.25",
"react": "^18.2.0",
"react": "^18.3.1",
"typescript": "^5.2.2"
},
"peerDependencies": {
"react": "*"
},
"devDependencies": {
"@testing-library/cypress": "^8.0.7",
"@testing-library/cypress": "^10.1.0",
"@types/mocha": "^10.0.4",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"cypress": "^11.2.0",
"cypress": "^15.3.0",
"eslint": "^8.53.0",
"eslint-plugin-react": "^7.33.2",
"prettier": "^3.1.0",
"react-dom": "^18.2.0",
"react-dom": "^18.3.1",
"rimraf": "^5.0.5",
"ts-loader": "^9.5.0",
"webpack": "^5.101.3",
Expand Down
2 changes: 2 additions & 0 deletions src/HeadlessContentRenderer/HeadlessContentRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const HeadlessContentRenderer: React.FunctionComponent<
case 'images':
case 'imageslideshow':
return <ImageViewer {...(contentNode as ImageViewerProps)} />;
default:
return null;
}
})}
</>
Expand Down
5 changes: 2 additions & 3 deletions src/Text/Text.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import { createYield } from 'typescript';
import TextContent from './Text';

describe('<TextContent />', () => {
Expand All @@ -11,13 +10,13 @@ describe('<TextContent />', () => {
cy.findByRole('link', { name: 'internal' }).should(
'have.attr',
'href',
'https://example.com/internallink'
'https://example.com/internallink',
);

cy.findByRole('link', { name: 'external' }).should(
'have.attr',
'href',
'https://www.sitevision.se'
'https://www.sitevision.se',
);
});
});
Expand Down
4 changes: 3 additions & 1 deletion src/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface TextProps extends IContentNode {
const renderTextNodes = (
textNodes: ITextNode[],
baseUrl: string,
key = 'textNode'
key = 'textNode',
) => {
return textNodes.map((textNode, i) => {
const id = `${key}-${i}`;
Expand Down Expand Up @@ -50,6 +50,8 @@ const renderTextNodes = (
</Tag>
);
}
default:
return null;
}
});
};
Expand Down
Loading