diff --git a/src/components/Composer.tsx b/src/components/Composer.tsx index 5ab7e23..16ea114 100644 --- a/src/components/Composer.tsx +++ b/src/components/Composer.tsx @@ -1,11 +1,13 @@ -import { StyleSheet, TextInput, View } from "react-native"; +import { StyleSheet, View } from "react-native"; import { Text } from "./primitive/Text"; import { Button } from "./primitive/Button"; -import { useContext, useEffect, useMemo, useState } from "react"; +import { useContext, useEffect, useState } from "react"; import { AuthContext } from "../context/AuthContext"; import { Profile, resolveProfile } from "../lib/profile"; import { RichTextEditor } from "../lib/richtext/editor"; import { useRouter } from "expo-router"; +import { RichTextContent } from "../lib/richtext"; +import { dev } from "../lexicons"; const styles = StyleSheet.create({ composerHeader: { @@ -61,10 +63,14 @@ function ComposerHeader() { ); } -function ComposerBody() { +function ComposerBody({ + onChange, +}: { + onChange: (content: RichTextContent) => void; +}) { return ( - + ); } @@ -72,34 +78,57 @@ function ComposerBody() { function ComposerFooter({ onPublish, onCancel, + disabled, }: { onPublish: () => void; onCancel: () => void; + disabled?: boolean; }) { return ( -