From 5a1ebc13872c1c778cd4ca4ed8a8d71527b341fb Mon Sep 17 00:00:00 2001 From: Lucas Santana Date: Thu, 19 Dec 2024 19:13:18 -0300 Subject: [PATCH] Correcoes --- src/App.tsx | 5 ++++- src/components/RegistrationForm.tsx | 9 +++++---- src/types/index.ts | 13 ++++++++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 07585fd..a5c33f4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -84,7 +84,10 @@ export function App() { )} {step === 'register' && ( - + )} {step === 'avatar' && user && ( diff --git a/src/components/RegistrationForm.tsx b/src/components/RegistrationForm.tsx index 3665ac1..069e677 100644 --- a/src/components/RegistrationForm.tsx +++ b/src/components/RegistrationForm.tsx @@ -2,11 +2,12 @@ import React, { useState } from 'react'; import { User } from '../types'; import { Heart, User2, Info } from 'lucide-react'; -interface Props { - onComplete: (user: User) => void; -} +type RegistrationFormProps = { + userType: 'school' | 'teacher'; + onComplete: (userData: User) => void; +}; -export function RegistrationForm({ onComplete }: Props) { +export const RegistrationForm: React.FC = ({ userType, onComplete }) => { const [name, setName] = useState(''); const [age, setAge] = useState(8); const [gender, setGender] = useState<'boy' | 'girl' | 'other'>('other'); diff --git a/src/types/index.ts b/src/types/index.ts index 6d5146d..71c6ace 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -25,4 +25,15 @@ export interface Theme { export interface StoryPage { text: string; image: string; -} \ No newline at end of file +} + +export type Class = { + id?: string; + school_id: string; + name: string; + grade: string; + year: number; + period?: 'morning' | 'afternoon' | 'evening'; + created_at?: string; + updated_at?: string; +}; \ No newline at end of file