changeset and rename

Signed-off-by: Andrew Johnson <ajohnson@gocardless.com>
This commit is contained in:
Andrew Johnson
2021-03-31 18:44:11 +01:00
parent c397cd2cf0
commit 64d2ce7001
4 changed files with 12 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-github-deployments': minor
---
add reload button and functionality
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-github-deployments",
"version": "0.1.1",
"version": "0.1.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -38,7 +38,7 @@ const GithubDeploymentsComponent = ({
const api = useApi(githubDeploymentsApiRef);
const [owner, repo] = projectSlug.split('/');
const { loading, value, error, retry } = useAsyncRetry(
const { loading, value, error, retry: reload } = useAsyncRetry(
async () => await api.listDeployments({ owner, repo, last }),
);
@@ -50,7 +50,7 @@ const GithubDeploymentsComponent = ({
<GithubDeploymentsTable
deployments={value || []}
isLoading={loading}
retry={retry}
reload={reload}
/>
);
};
@@ -85,13 +85,13 @@ const columns: TableColumn<GithubDeployment>[] = [
type GithubDeploymentsTableProps = {
deployments: GithubDeployment[];
isLoading: boolean;
retry: () => void;
reload: () => void;
};
const GithubDeploymentsTable = ({
deployments,
isLoading,
retry,
reload,
}: GithubDeploymentsTableProps) => {
const classes = useStyles();
@@ -105,9 +105,9 @@ const GithubDeploymentsTable = ({
actions={[
{
icon: () => <SyncIcon />,
tooltip: 'Refresh',
tooltip: 'Reload',
isFreeAction: true,
onClick: () => retry(),
onClick: () => reload(),
},
]}
emptyContent={