Skip to content

Commit

Permalink
Merge pull request #1350 from appwrite/fix-notification-behind-redeploy
Browse files Browse the repository at this point in the history
fix: redeploy notification behind modal
  • Loading branch information
TorstenDittmann authored Sep 16, 2024
2 parents 3e401ae + 5cf94ed commit 7f56a63
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
export let show = false;
export let selectedDeployment: Models.Deployment = null;
let error: string;
async function redeploy() {
try {
Expand All @@ -28,17 +29,21 @@
invalidate(Dependencies.FUNCTION);
invalidate(Dependencies.DEPLOYMENTS);
show = false;
} catch (error) {
addNotification({
type: 'error',
message: error.message
});
trackError(error, Submit.FunctionRedeploy);
} catch (e) {
error = e.message;
trackError(e, Submit.FunctionRedeploy);
}
}
</script>

<Modal title="Redeploy function" size="big" bind:show onSubmit={redeploy} headerDivider={false}>
<Modal
title="Redeploy function"
size="big"
bind:show
bind:error
onSubmit={redeploy}
headerDivider={false}>
<p class="text">
Are you sure you want to redeploy <b>{$func.name}</b>? Redeploying may affect your
production code.
Expand Down

0 comments on commit 7f56a63

Please sign in to comment.