diff --git a/src/pages/student-dashboard/essays/NewEssay.tsx b/src/pages/student-dashboard/essays/NewEssay.tsx index 53bf70c..297175e 100644 --- a/src/pages/student-dashboard/essays/NewEssay.tsx +++ b/src/pages/student-dashboard/essays/NewEssay.tsx @@ -3,7 +3,12 @@ import { useNavigate } from 'react-router-dom'; import { supabase } from '@/lib/supabase'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; -import { ArrowLeft } from 'lucide-react'; +import { ArrowLeft, Sparkles } from 'lucide-react'; +import { useSession } from '@/hooks/useSession'; +import { useUppercasePreference } from '@/hooks/useUppercasePreference'; +import { AdaptiveText, AdaptiveTitle, AdaptiveParagraph } from '@/components/ui/adaptive-text'; +import { TextCaseToggle } from '@/components/ui/text-case-toggle'; +import { cn } from '@/lib/utils'; interface EssayType { id: string; @@ -31,6 +36,8 @@ export function NewEssay() { const [types, setTypes] = useState([]); const [genres, setGenres] = useState([]); const [loading, setLoading] = useState(true); + const { session } = useSession(); + const { isUpperCase, toggleUppercase, isLoading } = useUppercasePreference(session?.user?.id); useEffect(() => { loadTypes(); @@ -102,9 +109,11 @@ export function NewEssay() { {types.map((type) => ( { setSelectedType(type); loadGenres(type.id); @@ -113,10 +122,22 @@ export function NewEssay() { > - {type.icon} - {type.title} +
+ {type.icon} +
+
- {type.description} + + +
))} @@ -131,26 +152,48 @@ export function NewEssay() { {genres.map((genre) => ( createEssay(genre.id)} > - {genre.icon} - {genre.title} +
+ {genre.icon} +
+
- {genre.description} + + +
-
-

Mínimo: {genre.requirements.min_words} palavras

-

Máximo: {genre.requirements.max_words} palavras

-

Elementos necessários:

-
    - {genre.requirements.required_elements.map((element, index) => ( -
  • {element}
  • - ))} -
+
+
+

Requisitos

+
+

Mínimo: {genre.requirements.min_words} palavras

+

Máximo: {genre.requirements.max_words} palavras

+

Elementos necessários:

+
    + {genre.requirements.required_elements.map((element, index) => ( +
  • + +
  • + ))} +
+
+
@@ -161,11 +204,38 @@ export function NewEssay() { return (
-
+
+
+
+ +
+
+ + +
+ +
+ {step === 'genre' && ( )} -
-

Nova Redação

-

- {step === 'type' - ? 'Selecione o tipo textual' - : 'Selecione o gênero textual'} -

-
-
- {loading ? ( -
Carregando...
- ) : step === 'type' ? ( - renderTypeSelection() - ) : ( - renderGenreSelection() - )} + {loading ? ( +
+
+
+
+
+ ) : step === 'type' ? ( + renderTypeSelection() + ) : ( + renderGenreSelection() + )} +
); } \ No newline at end of file