I’ve got a simple home page, that’s supposed to navigate a user away if they’re logged in.
The page is quite fast in detecting a login (and then disabling, hiding and showing) the appropriate stuff - but the navigation takes really long.
In fact, the site as a whole tends to be on the slow side.
I would appreciate any help / insights into approving the site’s speed.
It’s currently on the Editor X essential plan. Will an more expensive plan improve the site speed?
Here is the site. The landing page is the main page that relates to my question: https://www.overlandercommunity.com/
Here is the VELO code for the page:
import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
$w.onReady(function () {
if (wixUsers.currentUser.loggedIn) {
// setupUser()
// setupUserVehicles()
$w("#buttonCustomLogin").collapse()
$w("#button37").collapse()
$w("#button36").expand()
$w("#loadingAnimation").show()
wixLocation.to('/dashboard')
} else {
// User is not logged in
// $w("#box114").expand()
$w("#buttonCustomLogin").expand()
$w("#button36").collapse()
$w("#button37").expand()
}
});
export function buttonCustomLogin_click(event) {
wixUsers.promptLogin()
}
export function buttonCustomSingUp_click(event) {
wixUsers.promptLogin()
}
export function button36_click(event) {
$w("#button36").disable()
$w("#loadingAnimation").show()
wixLocation.to('/dashboard')
}