mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-17 05:47:52 +00:00
Fluxos diversos
This commit is contained in:
parent
5192081bf0
commit
3efaf16c84
@ -1,7 +1,7 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
import { router } from '@/routes';
|
||||
import { router } from './routes';
|
||||
import './index.css';
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
|
||||
@ -67,11 +67,24 @@ export interface ClassWithStudents extends Class {
|
||||
students: Student[];
|
||||
}
|
||||
|
||||
export interface SchoolWithRelations extends School {
|
||||
// Interface base para School com relações
|
||||
interface BaseSchoolWithRelations extends School {
|
||||
teachers: Teacher[];
|
||||
}
|
||||
|
||||
// Interface específica para School com Classes e Students
|
||||
export interface SchoolWithClasses extends BaseSchoolWithRelations {
|
||||
classes: ClassWithStudents[];
|
||||
}
|
||||
|
||||
// Interface específica para School com Classes, Students e Stories
|
||||
export interface SchoolWithClassesAndStories extends BaseSchoolWithRelations {
|
||||
classes: ClassWithStudentsAndStories[];
|
||||
}
|
||||
|
||||
// Removendo a interface duplicada e usando as novas interfaces específicas
|
||||
export type SchoolWithRelations = SchoolWithClasses | SchoolWithClassesAndStories;
|
||||
|
||||
export interface StoryPage {
|
||||
text: string;
|
||||
image?: string;
|
||||
@ -102,9 +115,3 @@ export interface StudentWithStories extends Student {
|
||||
export interface ClassWithStudentsAndStories extends Class {
|
||||
students: StudentWithStories[];
|
||||
}
|
||||
|
||||
// Atualizando SchoolWithRelations
|
||||
export interface SchoolWithRelations extends School {
|
||||
teachers: Teacher[];
|
||||
classes: ClassWithStudentsAndStories[];
|
||||
}
|
||||
@ -13,11 +13,7 @@
|
||||
"strict": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@ -21,9 +21,7 @@ export default defineConfig({
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'node-fetch': 'isomorphic-fetch',
|
||||
'@': path.resolve(__dirname, './src')
|
||||
},
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
||||
'node-fetch': 'isomorphic-fetch'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user