Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
Upgrade react-scripts to 4.0.0#269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -5,30 +5,26 @@ import configuration from 'client/configuration'; | ||
| import Modal from 'components/Modal'; | ||
| import useApiQuery from 'client/useApiQuery'; | ||
| import { X } from 'react-feather'; | ||
| import assertDefined from 'utils/assertDefined'; | ||
| const clusterService = new ClusterServiceApi(configuration); | ||
| type Props = { | ||
| cluster: V1Cluster; | ||
| onClose: () => void; | ||
| type ArtifactsListProps = { | ||
| artifacts: V1Artifact[]; | ||
| }; | ||
| export default function DownloadArtifactsModal({ cluster, onClose }: Props): ReactElement { | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, it's just re-ordering of component definitions. | ||
| const closeButton = ( | ||
| <button type="button" className="btn btn-base" onClick={onClose}> | ||
| <X size={16} className="mr-2" /> Close | ||
| </button> | ||
| ); | ||
| function ArtifactsList({ artifacts }: ArtifactsListProps): ReactElement { | ||
| return ( | ||
| <Modal | ||
| isOpen | ||
| onRequestClose={onClose} | ||
| header={`Artifacts for ${cluster.ID}`} | ||
| buttons={closeButton} | ||
| > | ||
| <Artifacts cluster={cluster} /> | ||
| </Modal> | ||
| <ul className="list-disc ml-5"> | ||
| {artifacts.map((artifact) => ( | ||
| <li key={artifact.Name}> | ||
| <a href={artifact.URL} className="underline text-blue-500"> | ||
| {artifact.Name} | ||
| </a>{' '} | ||
| - {artifact.Description} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| ); | ||
| } | ||
| @@ -63,21 +59,28 @@ function Artifacts({ cluster }: ArtifactsProps): ReactElement { | ||
| return <p>There are no artifacts for this cluster.</p>; | ||
| } | ||
| type ArtifactsListProps = { | ||
| artifacts: V1Artifact[]; | ||
| type Props = { | ||
| cluster: V1Cluster; | ||
| onClose: () => void; | ||
| }; | ||
| function ArtifactsList({ artifacts }: ArtifactsListProps): ReactElement { | ||
| export default function DownloadArtifactsModal({ cluster, onClose }: Props): ReactElement { | ||
| assertDefined(cluster.ID); | ||
| const closeButton = ( | ||
| <button type="button" className="btn btn-base" onClick={onClose}> | ||
| <X size={16} className="mr-2" /> Close | ||
| </button> | ||
| ); | ||
| return ( | ||
| <ul className="list-disc ml-5"> | ||
| {artifacts.map((artifact) => ( | ||
| <li key={artifact.Name}> | ||
| <a href={artifact.URL} className="underline text-blue-500"> | ||
| {artifact.Name} | ||
| </a>{' '} | ||
| - {artifact.Description} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| <Modal | ||
| isOpen | ||
| onRequestClose={onClose} | ||
| header={`Artifacts for ${cluster.ID}`} | ||
| buttons={closeButton} | ||
| > | ||
| <Artifacts cluster={cluster} /> | ||
| </Modal> | ||
| ); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file nothing changed except of the order in which components are defined. Airbnb code style now requires things to be defined before they're used, which is a common practice I've seen across many respectful OSS projects. It's an opinionated thing... yet we agreed before to outsource decisions about opinionated topics to Prettier and Airbnb, so following the suite :)