mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-17 05:47:52 +00:00
- Adiciona página de listagem de histórias com filtros e ordenação - Cria formulário de criação de novas histórias com temas - Implementa visualizador de história com navegação entre páginas - Integra gravador de áudio para leitura - Adiciona funcionalidade de compartilhamento - Implementa estados de loading e tratamento de erros
151 lines
3.8 KiB
TypeScript
151 lines
3.8 KiB
TypeScript
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';
|
|
import { SettingsPage } from './pages/dashboard/settings/SettingsPage';
|
|
import { StudentDashboardPage } from './pages/student-dashboard/StudentDashboardPage';
|
|
import { StudentDashboardLayout } from './pages/student-dashboard/StudentDashboardLayout';
|
|
import { StudentStoriesPage } from './pages/student-dashboard/StudentStoriesPage';
|
|
import { CreateStoryPage } from './pages/student-dashboard/CreateStoryPage';
|
|
import { StoryPage } from './pages/student-dashboard/StoryPage';
|
|
|
|
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) => {
|
|
console.log('Registro completo:', 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: 'configuracoes',
|
|
element: <SettingsPage />
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/demo',
|
|
element: <StoryViewer demo={true} />,
|
|
},
|
|
{
|
|
path: '/auth/callback',
|
|
element: <AuthCallback />
|
|
},
|
|
{
|
|
path: '/aluno',
|
|
element: <StudentDashboardLayout />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <StudentDashboardPage />,
|
|
},
|
|
{
|
|
path: 'historias',
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <StudentStoriesPage />,
|
|
},
|
|
{
|
|
path: 'nova',
|
|
element: <CreateStoryPage />,
|
|
},
|
|
{
|
|
path: ':id',
|
|
element: <StoryPage />,
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]);
|