diff --git a/packages/builder/src/components/deploy/DeploymentHistory.svelte b/packages/builder/src/components/deploy/DeploymentHistory.svelte new file mode 100644 index 0000000000..d9dc549294 --- /dev/null +++ b/packages/builder/src/components/deploy/DeploymentHistory.svelte @@ -0,0 +1,122 @@ + + +
+ Deployment History + {#if deployments.length > 0} + + + View Your Deployed App → + + + {/if} + {#each deployments as deployment} +
+
+ + {formatDate(deployment.updatedAt, 'fullDate')} + + + {formatDate(deployment.updatedAt, 'timeOnly')} + +
+
+ {deployment.status} +
+
+ {/each} +
+ + diff --git a/packages/builder/src/pages/[application]/deploy/index.svelte b/packages/builder/src/pages/[application]/deploy/index.svelte index 4ab9cd2789..afeb17f5e2 100644 --- a/packages/builder/src/pages/[application]/deploy/index.svelte +++ b/packages/builder/src/pages/[application]/deploy/index.svelte @@ -5,6 +5,7 @@ import { notifier } from "builderStore/store/notifications" import api from "builderStore/api" import Spinner from "components/common/Spinner.svelte" + import DeploymentHistory from "components/deploy/DeploymentHistory.svelte" import analytics from "analytics" let deployed = false @@ -43,8 +44,8 @@ async function fetchDeployments() { try { - const response = api.get(`/api/deployments`) - deployments = await response.json + const response = await api.get(`/api/deployments`) + deployments = await response.json() } catch (err) { console.error(err) notifier.danger("Error fetching deployment history. Please try again.") @@ -74,11 +75,7 @@ Rocket flying through sky -
- {#each deployments as deployment} -
{JSON.stringify(deployment)}
- {/each} -
+