2 Commits

Author SHA1 Message Date
developer1054 0fa382ef0e Merge branch 'main' of https://git.hgtx.com.br/luis.felipe/OPEN_CODEX_API 2025-10-28 11:34:30 -03:00
developer1054 c2aa536660 fix redir 2025-10-28 11:34:25 -03:00
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ const App = () => (
element={<Redirect />}
/>
<Route path="/*" element={GlobalFunctions.isUsuarioLogado() ? <Index /> : <HGTXLogin />} />
<Route path="/*" element={<Index />} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
<Route path="*" element={<NotFound />} />
<Route path="/404" element={<NotFound />} />
+6
View File
@@ -8,6 +8,8 @@ import { BotView } from "@/components/bots/BotView";
import { BotChat } from "@/components/bots/BotChat";
import { AgentView } from "@/components/agent/AgentView";
import { Navigate, Route, Routes } from "react-router-dom";
import React from "react";
import { GlobalFunctions } from "@/GlobalFunctions";
interface Bot {
id: string;
@@ -28,6 +30,10 @@ const Index = () => {
setActiveBotChat(null);
};
React.useEffect(() => {
if(!GlobalFunctions.isUsuarioLogado())window.location.replace(import.meta.env.VITE_BASE_URL_HGTX_CORE);
},[]);
return (<Routes>
<Route path="" element={<Navigate to={`/404`} replace />} />
<Route path="codex">