fixed navbar
This commit is contained in:
@@ -40,8 +40,9 @@ function Header() {
|
||||
<div className={header.yellowPart}></div>
|
||||
<div className={header.containerBarNav}>
|
||||
{role === "ADMINISTRADOR" && <BarNavigation />}
|
||||
{/*role === "operator" && <OperatorBarNavigation />*/}
|
||||
{/*role === "social" && <SocialServiceBarNavigation />*/}
|
||||
{role === "SUPER ADMINISTRADOR (quita sanciones)" && <BarNavigation />}
|
||||
{role === "SERVICIO SOCIAL" && <BarNavigation/>}
|
||||
{role === "ATENCION A USUARIO" && <BarNavigation/>}
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ export function middleware(request: NextRequest) {
|
||||
const token = request.cookies.get("token")?.value;
|
||||
const pathname = request.nextUrl.pathname;
|
||||
|
||||
if (pathname === "/") {
|
||||
return NextResponse.next();
|
||||
if (pathname === "/" && token) {
|
||||
return NextResponse.redirect(new URL("/Impresiones", request.url));
|
||||
}
|
||||
|
||||
if (!token) {
|
||||
if (!token && pathname != "/") {
|
||||
console.log("No hay token, redirigiendo a login");
|
||||
return NextResponse.redirect(new URL("/", request.url));
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
"build": "next build",
|
||||
"start": "source ~/.nvm/nvm.sh && node --version && nvm use 22.10.0 && npm install && next build && next start -p 3356",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user