Skip to content

Commit

Permalink
- Addresses Type 'ReactNode' is not assignable to
Browse files Browse the repository at this point in the history
type 'NonNullable<ReactNodeLike>' error in unit test
  • Loading branch information
sophia-massie committed Oct 3, 2024
1 parent e5a4817 commit 0ff0f14
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions react/src/components/utils/EmptyTablePlaceholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ import { SectionMessage } from '../../core-components';
import styles from './EmptyTablePlaceholder.module.css';
import React from 'react';


Check failure on line 5 in react/src/components/utils/EmptyTablePlaceholder.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Delete `⏎`
interface EmptyPlaceholderProps {
children: React.ReactNode;
type: 'error' | 'warning' | 'info' | 'success';
children?: React.ReactNode;
type: 'error' | 'warning' | 'info' | 'success';

Check failure on line 8 in react/src/components/utils/EmptyTablePlaceholder.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Delete `·`
}

export const EmptyTablePlaceholder: React.FC<EmptyPlaceholderProps> = ({
children,
type,
type,

Check failure on line 13 in react/src/components/utils/EmptyTablePlaceholder.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Delete `·`
}) => {
return (
<div className={styles['empty']}>
<SectionMessage type={type}>{children}</SectionMessage>
{children ? (
<SectionMessage type={type}>{children}</SectionMessage>
) : <SectionMessage type={type}>No data available.</SectionMessage>}

Check failure on line 19 in react/src/components/utils/EmptyTablePlaceholder.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Replace `<SectionMessage·type={type}>No·data·available.</SectionMessage>` with `(⏎········<SectionMessage·type={type}>No·data·available.</SectionMessage>⏎······)`
</div>
);
};
Expand Down

0 comments on commit 0ff0f14

Please sign in to comment.