From d8c665d48e6f77aca0cf334e91fef1aa745ad9c1 Mon Sep 17 00:00:00 2001 From: Lucas Santana Date: Fri, 20 Dec 2024 10:10:02 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20corrige=20navega=C3=A7=C3=A3o=20para=20p?= =?UTF-8?q?=C3=A1gina=20de=20demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ajusta configuração da rota /demo no router - Garante que o handleDemo está sendo chamado corretamente - Adiciona debug para verificar navegação - Mantém consistência com padrão de rotas existente --- src/routes/index.tsx | 136 ++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 65 deletions(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 54751bb..d72fed7 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -19,98 +19,104 @@ import React from 'react'; export const router = createBrowserRouter([ { path: '/', - element: , - }, - { - path: '/login', - children: [ - { - path: 'school', - element: , - }, - { - path: 'teacher', - element: , - }, - { - path: 'student', - element: , - } - ] - }, - { - path: '/register', - children: [ - { - path: 'school', - element: , - }, - { - path: 'teacher', - element: { - console.log(userData); - }} - />, - } - ] - }, - { - path: '/dashboard', - element: , + element: , children: [ { index: true, - element: , + element: , }, { - path: 'turmas', + path: 'demo', + element: , + }, + { + path: '/login', children: [ { - index: true, - element: , + path: 'school', + element: , }, { - path: 'nova', - element: , + path: 'teacher', + element: , + }, + { + path: 'student', + element: , } ] }, { - path: 'professores', + path: '/register', children: [ { - index: true, - element: , + path: 'school', + element: , }, { - path: 'convidar', - element: , + path: 'teacher', + element: { + console.log(userData); + }} + />, } ] }, { - path: 'alunos', + path: '/dashboard', + element: , children: [ { index: true, - element: , + element: , }, { - path: 'novo', - element: , + path: 'turmas', + children: [ + { + index: true, + element: , + }, + { + path: 'nova', + element: , + } + ] + }, + { + path: 'professores', + children: [ + { + index: true, + element: , + }, + { + path: 'convidar', + element: , + } + ] + }, + { + path: 'alunos', + children: [ + { + index: true, + element: , + }, + { + path: 'novo', + element: , + } + ] } ] - } - ] - }, - { - path: '/demo', - element: , - }, - { - path: '/auth/callback', - element: + }, + { + path: '/auth/callback', + element: + }, + ], }, ]); \ No newline at end of file