From a0318f76f40deaeba367badf18af6141325d29e9 Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Thu, 25 May 2023 19:53:48 -0600
Subject: Añade redirecciones faltantes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/components/forms/login_form.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/components/forms/login_form.tsx')

diff --git a/src/components/forms/login_form.tsx b/src/components/forms/login_form.tsx
index b1a2296..74557e2 100644
--- a/src/components/forms/login_form.tsx
+++ b/src/components/forms/login_form.tsx
@@ -1,9 +1,10 @@
 import { Modal } from "flowbite";
-import UserAccountButton from "../user_account_button";
+import RedirectTo from '../../lib/redirect_to';
 import { useEffect, useState } from "react";
 import { ApiClient } from "../../clients/api_client";
 import Token from "../../lib/token";
 import "../stylesheets/shared.css"
+import redirectTo from "../../lib/redirect_to";
 
 export function LoginForm() {
   const [error_message, setErrorMessage] = useState('');
@@ -43,6 +44,7 @@ export function LoginForm() {
       const token = new Token();
       token.set(response.data.token);
       token.setRefresh(response.data.refresh);
+      redirectTo('/products');
     } catch(error) {
       setErrorMessage(error.response.data.errors.auth);
     }
-- 
cgit v1.2.3

