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 { StrictMode } from 'react';
|
||||||
import { createRoot } from 'react-dom/client';
|
import { createRoot } from 'react-dom/client';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
import { router } from '@/routes';
|
import { router } from './routes';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
|
|||||||
@ -67,11 +67,24 @@ export interface ClassWithStudents extends Class {
|
|||||||
students: Student[];
|
students: Student[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchoolWithRelations extends School {
|
// Interface base para School com relações
|
||||||
|
interface BaseSchoolWithRelations extends School {
|
||||||
teachers: Teacher[];
|
teachers: Teacher[];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface específica para School com Classes e Students
|
||||||
|
export interface SchoolWithClasses extends BaseSchoolWithRelations {
|
||||||
classes: ClassWithStudents[];
|
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 {
|
export interface StoryPage {
|
||||||
text: string;
|
text: string;
|
||||||
image?: string;
|
image?: string;
|
||||||
@ -102,9 +115,3 @@ export interface StudentWithStories extends Student {
|
|||||||
export interface ClassWithStudentsAndStories extends Class {
|
export interface ClassWithStudentsAndStories extends Class {
|
||||||
students: StudentWithStories[];
|
students: StudentWithStories[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Atualizando SchoolWithRelations
|
|
||||||
export interface SchoolWithRelations extends School {
|
|
||||||
teachers: Teacher[];
|
|
||||||
classes: ClassWithStudentsAndStories[];
|
|
||||||
}
|
|
||||||
@ -13,11 +13,7 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": false,
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["src/*"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'node-fetch': 'isomorphic-fetch',
|
'node-fetch': 'isomorphic-fetch'
|
||||||
'@': path.resolve(__dirname, './src')
|
}
|
||||||
},
|
|
||||||
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user