mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-17 05:47:52 +00:00
Correcoes
This commit is contained in:
parent
b213483fb7
commit
5a1ebc1387
@ -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} />
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -26,3 +26,14 @@ 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;
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user