Skip to content

Commit 20a3df2

Browse files
committed
Move retry to alert
1 parent 5a0f50a commit 20a3df2

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/retryDomainModal.svelte

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
4242
let verified = $state(false);
4343
44-
let error = $state(null);
4544
async function retryDomain() {
4645
try {
4746
const domain = await sdk
@@ -56,19 +55,17 @@
5655
});
5756
trackEvent(Submit.DomainUpdateVerification);
5857
} catch (e) {
59-
error = e.message;
58+
addNotification({
59+
type: 'error',
60+
message:
61+
'Domain verification failed. Please check your domain settings or try again later'
62+
});
6063
trackError(e, Submit.DomainUpdateVerification);
6164
}
6265
}
63-
64-
$effect(() => {
65-
if (!show) {
66-
error = null;
67-
}
68-
});
6966
</script>
7067

71-
<Modal title="Retry verification" bind:show onSubmit={retryDomain} bind:error>
68+
<Modal title="Retry verification" bind:show onSubmit={retryDomain}>
7269
<div>
7370
<Tabs.Root variant="secondary" let:root>
7471
{#if isSubDomain && !!$regionalConsoleVariables._APP_DOMAIN_TARGET_CNAME && $regionalConsoleVariables._APP_DOMAIN_TARGET_CNAME !== 'localhost'}

0 commit comments

Comments
 (0)