fix redir
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ const App = () => (
|
|||||||
element={<Redirect />}
|
element={<Redirect />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route path="/*" element={GlobalFunctions.isUsuarioLogado() ? <Index /> : <HGTXLogin />} />
|
<Route path="/*" element={<Index />} />
|
||||||
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
|
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
|
||||||
<Route path="*" element={<NotFound />} />
|
<Route path="*" element={<NotFound />} />
|
||||||
<Route path="/404" element={<NotFound />} />
|
<Route path="/404" element={<NotFound />} />
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import { BotView } from "@/components/bots/BotView";
|
|||||||
import { BotChat } from "@/components/bots/BotChat";
|
import { BotChat } from "@/components/bots/BotChat";
|
||||||
import { AgentView } from "@/components/agent/AgentView";
|
import { AgentView } from "@/components/agent/AgentView";
|
||||||
import { Navigate, Route, Routes } from "react-router-dom";
|
import { Navigate, Route, Routes } from "react-router-dom";
|
||||||
|
import React from "react";
|
||||||
|
import { GlobalFunctions } from "@/GlobalFunctions";
|
||||||
|
|
||||||
interface Bot {
|
interface Bot {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -28,6 +30,10 @@ const Index = () => {
|
|||||||
setActiveBotChat(null);
|
setActiveBotChat(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if(!GlobalFunctions.isUsuarioLogado())window.location.replace(import.meta.env.VITE_BASE_URL_HGTX_CORE);
|
||||||
|
},[]);
|
||||||
|
|
||||||
return (<Routes>
|
return (<Routes>
|
||||||
<Route path="" element={<Navigate to={`/404`} replace />} />
|
<Route path="" element={<Navigate to={`/404`} replace />} />
|
||||||
<Route path="codex">
|
<Route path="codex">
|
||||||
|
|||||||
Reference in New Issue
Block a user