mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
feat: add Publicities page with comprehensive management functionalities including list/calendar views and CRUD operations.
This commit is contained in:
1 parent
18c51959af
commit
eb3fb119ee
2 files changed
+26
-12
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { Switch, Route } from "wouter";
|
||||
import { useEffect } from "react";
|
||||
import { Switch, Route, useLocation } from "wouter";
|
||||
import { useAuthUnified } from "@/hooks/useAuthUnified";
|
||||
import { useScreenSize } from "@/hooks/use-screen-size";
|
||||
import NotFound from "@/pages/not-found";
|
||||
@@ -42,6 +43,15 @@ import MobileDlcPage from "@/pages/mobile/DlcPage";
|
||||
import MobileSavPage from "@/pages/mobile/SavPage";
|
||||
import MobileAvoirsPage from "@/pages/mobile/AvoirsPage";
|
||||
|
||||
// Helper component to handle redirection
|
||||
const RedirectToAuth = () => {
|
||||
const [, setLocation] = useLocation();
|
||||
useEffect(() => {
|
||||
setLocation("/auth");
|
||||
}, [setLocation]);
|
||||
return <AuthPage />;
|
||||
};
|
||||
|
||||
function RouterProduction() {
|
||||
const { isAuthenticated, isLoading, user, environment, error } = useAuthUnified();
|
||||
const { isMobile } = useScreenSize();
|
||||
@@ -86,7 +96,8 @@ function RouterProduction() {
|
||||
<Switch>
|
||||
<Route path="/auth" component={AuthPage} />
|
||||
<Route path="/" component={AuthPage} />
|
||||
<Route component={NotFound} />
|
||||
{/* Redirect all other routes to auth */}
|
||||
<Route component={RedirectToAuth} />
|
||||
</Switch>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user