Different landing page rules for mobile

I have a welcome page (or landing page if you prefer) that appears first, with a short animated logo.
After that I want to automatically go to the main home page.
My logo takes 11.5 seconds to animate.

The code below, which was kindly suggested on another post by @salman-hammed , is almost right for my needs:

But rather than pointing desktop and mobile to different pages, I want to send them both to the same page, but mobile with no delay, and desktop with 11.5secs delay, so that desktop only waits and watches the animation.

This code makes the desktop version work great, but it also makes the mobile version site wait, which I’m trying to avoid.

I need to make the setTimeout function just apply to the desktop version.

Any suggestions would be very gratefully received!! Thank you!

import wixWindow from ‘wix-window’ ;
import wixLocation from ‘wix-location’ ;
$w . onReady (() => {
setTimeout (()=>{
if ( wixWindow . formFactor === ‘Mobile’ ){
wixLocation . to ( ‘https://www.littlewolf.co.uk/home’ )
} else {
wixLocation . to ( ‘https://www.littlewolf.co.uk/home’ )
}
} , 11500 )
})

import wixWindow from 'wix-window';
import wixLocation from 'wix-location'; 
$w.onReady(() => {
let timeout = 11500;
if(wixWindow.formFactor === 'Mobile' ){timeout = 0;}
setTimeout(()=> wixLocation.to('https://www.littlewolf.co.uk/home') , timeout);
})

Amazing! Thank you JD

Massive shout out to all those who are helping those of us with little/no coding knowledge!!

Ah… just one more tiny thing…

As I’m not using my full animated logo on the mobile version, I’ve opted for Wix’s Mobile Welcome Screen with my logo instead.

However, for some reason this is now appearing twice - once when the welcome page loads and again immediately again when the home page loads.

Is there a way that this can be stopped and only appear once?

Cheers ALL!

I don’t understand the situation. Please add screenshots and code.