mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-17 05:47:52 +00:00
Correções
This commit is contained in:
parent
543ed7532b
commit
6afb728dce
@ -1,116 +0,0 @@
|
||||
import { createBrowserRouter } from 'react-router-dom';
|
||||
import { HomePage } from '../components/home/HomePage';
|
||||
import { LoginForm } from '../components/auth/LoginForm';
|
||||
import { SchoolRegistrationForm } from '../components/auth/SchoolRegistrationForm';
|
||||
import { RegistrationForm } from '../components/RegistrationForm';
|
||||
import { StoryViewer } from '../components/StoryViewer';
|
||||
import { AuthCallback } from '../pages/AuthCallback';
|
||||
import { DashboardLayout } from '../pages/dashboard/DashboardLayout';
|
||||
import { DashboardHome } from '../pages/dashboard/DashboardHome';
|
||||
import { ClassesPage } from '../pages/dashboard/classes/ClassesPage';
|
||||
import { CreateClassPage } from '../pages/dashboard/classes/CreateClassPage';
|
||||
import { TeachersPage } from '../pages/dashboard/teachers/TeachersPage';
|
||||
import { InviteTeacherPage } from '../pages/dashboard/teachers/InviteTeacherPage';
|
||||
import { StudentsPage } from '../pages/dashboard/students/StudentsPage';
|
||||
import { AddStudentPage } from '../pages/dashboard/students/AddStudentPage';
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
{
|
||||
path: '/',
|
||||
element: <HomePage />,
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
children: [
|
||||
{
|
||||
path: 'school',
|
||||
element: <LoginForm userType="school" />,
|
||||
},
|
||||
{
|
||||
path: 'teacher',
|
||||
element: <LoginForm userType="teacher" />,
|
||||
},
|
||||
{
|
||||
path: 'student',
|
||||
element: <LoginForm userType="student" />,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
children: [
|
||||
{
|
||||
path: 'school',
|
||||
element: <SchoolRegistrationForm />,
|
||||
},
|
||||
{
|
||||
path: 'teacher',
|
||||
element: <RegistrationForm
|
||||
userType="teacher"
|
||||
onComplete={(userData) => {
|
||||
// Adicione aqui a lógica para lidar com os dados do usuário
|
||||
// Por exemplo, redirecionar para outra página ou salvar os dados
|
||||
console.log(userData);
|
||||
}}
|
||||
/>,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/dashboard',
|
||||
element: <DashboardLayout />,
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <DashboardHome />,
|
||||
},
|
||||
{
|
||||
path: 'turmas',
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <ClassesPage />,
|
||||
},
|
||||
{
|
||||
path: 'nova',
|
||||
element: <CreateClassPage />,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'professores',
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <TeachersPage />,
|
||||
},
|
||||
{
|
||||
path: 'convidar',
|
||||
element: <InviteTeacherPage />,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'alunos',
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <StudentsPage />,
|
||||
},
|
||||
{
|
||||
path: 'novo',
|
||||
element: <AddStudentPage />,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/demo',
|
||||
element: <StoryViewer demo={true} />,
|
||||
},
|
||||
{
|
||||
path: '/auth/callback',
|
||||
element: <AuthCallback />
|
||||
},
|
||||
]);
|
||||
@ -13,6 +13,7 @@ import { TeachersPage } from '../pages/dashboard/teachers/TeachersPage';
|
||||
import { InviteTeacherPage } from '../pages/dashboard/teachers/InviteTeacherPage';
|
||||
import { StudentsPage } from '../pages/dashboard/students/StudentsPage';
|
||||
import { AddStudentPage } from '../pages/dashboard/students/AddStudentPage';
|
||||
import React from 'react';
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user