Skip to content

Commit

Permalink
fixup! fixup! chore: upgrade typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
akurinnoy committed Nov 15, 2024
1 parent 86febe6 commit ce36d6b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ exports[`TextFileUploadPreview snapshot 1`] = `
/>
</svg>
Uploaded
<span
className={null}
style={{}}
>
12 bytes
</span>
12bytes
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class TextFileUploadPreview extends React.PureComponent<Props> {
return <></>;
}

const numberOfBytes = file.size + (file.size === 1 ? 'byte' : 'bytes');
const numberOfBytes = file.size + (file.size === 1 ? ' byte' : ' bytes');

return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ exports[`The WorkspaceEvents component snapshot - no events 1`] = `
data-pf-content={true}
>
Showing
<span
className={null}
style={{}}
>
<span>
0 events
</span>
</small>
Expand Down Expand Up @@ -163,10 +160,7 @@ exports[`The WorkspaceEvents component snapshot - with events 1`] = `
data-pf-content={true}
>
Showing
<span
className={null}
style={{}}
>
<span>
2 events
</span>
</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class WorkspaceEvents extends React.PureComponent<Props> {
const events = this.props.eventsFromResourceVersionFn(startResourceVersion);
const eventItems = this.getEventItems(events);

const numberOfEvents = eventItems.length + (eventItems.length === 1 ? ' event' : ' events');
const numberOfEvents = <span>{eventItems.length + (eventItems.length === 1 ? ' event' : ' events')}</span>;

Check failure on line 99 in packages/dashboard-frontend/src/components/WorkspaceEvents/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-test-yarn-v1 (18.x)

Replace `<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>` with `(⏎······<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>⏎····)`

Check failure on line 99 in packages/dashboard-frontend/src/components/WorkspaceEvents/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-test (20.x)

Replace `<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>` with `(⏎······<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>⏎····)`

Check failure on line 99 in packages/dashboard-frontend/src/components/WorkspaceEvents/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-test-yarn-v1 (20.x)

Replace `<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>` with `(⏎······<span>{eventItems.length·+·(eventItems.length·===·1·?·'·event'·:·'·events')}</span>⏎····)`

const tailStackItem = (
<StackItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ class SamplesListToolbar extends React.PureComponent<Props> {
}

if (foundCount === 0) {
return <>Nothing found</>;
return <span>Nothing found</span>;
}

const numberOfItems = foundCount + (foundCount === 1 ? 'item' : 'items');
return <>{numberOfItems}</>;
return <span>{foundCount + (foundCount === 1 ? ' item' : ' items')}</span>;
}

render(): React.ReactElement {
Expand Down

0 comments on commit ce36d6b

Please sign in to comment.