JSFiddle - React, Tailwind, and code Playground

by Kishor Velayutham

JavaScript

window.mobilecheck = function() {
           var check = false;
           if(window.innerWidth<768){
               check=true;
           }
           return check;
         }
         if(window.mobilecheck()){
         alert("mobile");
             window.location.href="home-mobile.html";
         }
         else {
            alert("desktop");
            window.location.href="home-desktop.html";
         }