diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue
index e44ae5ca..cf9ea854 100644
--- a/frontend/src/components/Layouts/AppSidebar.vue
+++ b/frontend/src/components/Layouts/AppSidebar.vue
@@ -73,6 +73,7 @@
+
{
+ isPaymentModeAdded.value = data.is_payment_method_added
+ },
+})
export const confirmLoginToFrappeCloud = () => {
+ currentSiteInfo.fetch()
+
const { $dialog } = globalStore()
+
$dialog({
title: __('Login to Frappe Cloud?'),
message: __(
@@ -24,19 +37,13 @@ export const confirmLoginToFrappeCloud = () => {
}
const loginToFrappeCloud = () => {
- call(
- 'frappe.integrations.frappe_providers.frappecloud_billing.current_site_info',
- ).then((response) => {
- if (!response) return
+ let redirectRoute = ''
- let redirectRoute = ''
+ if (isPaymentModeAdded.value) {
+ redirectRoute = '/dashboard'
+ } else {
+ redirectRoute = '/dashboard/welcome'
+ }
- if (response.is_payment_method_added) {
- redirectRoute = '/dashboard'
- } else {
- redirectRoute = '/dashboard/welcome'
- }
-
- window.open(`${frappeCloudBaseEndpoint}${redirectRoute}`, '_blank')
- })
+ window.open(`${frappeCloudBaseEndpoint}${redirectRoute}`, '_blank')
}