feat: Pre-renderizar la navegación del dashboard para mejorar el rendimiento y evitar promesas no resueltas

This commit is contained in:
Shni
2025-10-14 23:54:37 -05:00
parent 66cdbfdc32
commit 4358eb20de
2 changed files with 28 additions and 1 deletions

View File

@@ -22,7 +22,12 @@
<body class="min-h-screen pixel-grid-bg pt-14" style="background-image: url('/assets/images/background.svg'); background-size: cover; background-position: center; background-attachment: fixed; background-repeat: no-repeat;">
<% if (useDashboardNav) { %>
<%- include('../partials/dashboard_nav') %>
<%# If the server pre-rendered the dashboard nav it will be available as dashboardNav (string) %>
<% if (typeof dashboardNav !== 'undefined' && dashboardNav) { %>
<%- dashboardNav %>
<% } else { %>
<%- include('../partials/dashboard_nav') %>
<% } %>
<% } else if (!hideNavbar) { %>
<%- include('../partials/navbar', { appName }) %>
<% } %>