Correcoes

This commit is contained in:
Lucas Santana 2024-12-19 19:13:18 -03:00
parent b213483fb7
commit 5a1ebc1387
3 changed files with 21 additions and 6 deletions

View File

@ -84,7 +84,10 @@ export function App() {
</div>
)}
{step === 'register' && (
<RegistrationForm onComplete={handleRegistrationComplete} />
<RegistrationForm
userType="school"
onComplete={handleRegistrationComplete}
/>
)}
{step === 'avatar' && user && (
<AvatarSelector user={user} onComplete={handleAvatarComplete} />

View File

@ -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<RegistrationFormProps> = ({ userType, onComplete }) => {
const [name, setName] = useState('');
const [age, setAge] = useState(8);
const [gender, setGender] = useState<'boy' | 'girl' | 'other'>('other');

View File

@ -25,4 +25,15 @@ export interface Theme {
export interface StoryPage {
text: string;
image: string;
}
}
export type Class = {
id?: string;
school_id: string;
name: string;
grade: string;
year: number;
period?: 'morning' | 'afternoon' | 'evening';
created_at?: string;
updated_at?: string;
};