Explorar el Código

auto redirect

master
azri hace 1 semana
padre
commit
4738c850a5
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      src/pages/Products/index.jsx

+ 3
- 1
src/pages/Products/index.jsx Ver fichero

@@ -20,7 +20,9 @@ const Products = () => {
20 20
         setCollection(selectCollection)
21 21
       }
22 22
 
23
-    } 
23
+    }else{
24
+      window.location.href = "/"
25
+    }
24 26
   }, [])
25 27
 
26 28
   return (

Loading…
Cancelar
Guardar