Do not unpack arguments directly on exported items

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-12-07 19:42:10 +01:00
parent 95ab7baba6
commit dcd1a0c3f4
66 changed files with 433 additions and 708 deletions
@@ -80,15 +80,12 @@ const GithubDeploymentsComponent = ({
);
};
export const GithubDeploymentsCard = ({
last,
lastStatuses,
columns,
}: {
export const GithubDeploymentsCard = (props: {
last?: number;
lastStatuses?: number;
columns?: TableColumn<GithubDeployment>[];
}) => {
const { last, lastStatuses, columns } = props;
const { entity } = useEntity();
const [host] = [
entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION],
@@ -36,12 +36,8 @@ type GithubDeploymentsTableProps = {
columns: TableColumn<GithubDeployment>[];
};
export function GithubDeploymentsTable({
deployments,
isLoading,
reload,
columns,
}: GithubDeploymentsTableProps) {
export function GithubDeploymentsTable(props: GithubDeploymentsTableProps) {
const { deployments, isLoading, reload, columns } = props;
const classes = useStyles();
return (
@@ -27,8 +27,8 @@ import {
Link,
} from '@backstage/core-components';
export const GithubStateIndicator = ({ state }: { state: string }) => {
switch (state) {
export const GithubStateIndicator = (props: { state: string }) => {
switch (props.state) {
case 'PENDING':
return <StatusPending />;
case 'IN_PROGRESS':