diff --git a/mobile/app/question/[questionId].tsx b/mobile/app/question/[questionId].tsx index 56efd795..b24ca997 100644 --- a/mobile/app/question/[questionId].tsx +++ b/mobile/app/question/[questionId].tsx @@ -38,6 +38,7 @@ import { import { useEffect, useState } from "react"; import { ScrollView, View } from "react-native"; import placeholderProfile from "@/assets/images/placeholder_profile.png"; +import { ContentWithSnippets } from "@/components/ContentWithSnippets"; export default function QuestionPage() { const { questionId } = useLocalSearchParams(); @@ -329,7 +330,7 @@ export default function QuestionPage() { - {question.content} + Answers diff --git a/mobile/app/question/[questionId]/answer.tsx b/mobile/app/question/[questionId]/answer.tsx index 204d5e5d..7afe6c56 100644 --- a/mobile/app/question/[questionId]/answer.tsx +++ b/mobile/app/question/[questionId]/answer.tsx @@ -15,8 +15,17 @@ import { Icon, Textarea, TextareaInput, + Popover, + PopoverBackdrop, + PopoverContent, + PopoverArrow, + PopoverHeader, + PopoverCloseButton, + PopoverBody, + PopoverFooter, } from "@/components/ui"; -import { X } from "lucide-react-native"; +import { X, InfoIcon } from "lucide-react-native"; +import { ContentWithSnippets } from "@/components/ContentWithSnippets"; export default function NewAnswerPage() { const { questionId } = useLocalSearchParams<{ questionId: string }>(); @@ -24,6 +33,7 @@ export default function NewAnswerPage() { const router = useRouter(); const [content, setContent] = useState(""); + const [preview, setPreview] = useState(false); const contentLength = content.length; const token = useAuthStore((state) => state.token); @@ -68,15 +78,49 @@ export default function NewAnswerPage() { - Write your answer - + + Write your answer + { + return ( + + ) + }} + onOpen={() => console.log("Popover opened")} + > + + + + + + + + + + + + + + + + {preview ? ( + + ) : ( + + ) + } + {contentLength} / 1000