- {isEditing ? (
-
- ) : (
-
{question.title}
- )}
+ {isEditing ? (
+
+ ) : (
+
{question.title}
+ )}
@@ -226,8 +230,7 @@ export default function QuestionPage() {
className="flex items-center gap-4"
>
@@ -292,7 +295,7 @@ export default function QuestionPage() {
label: tag.name || "Loading...",
}))}
value={tags.map((tag) => String(tag))}
- onValueChange={(selectedIds) =>{
+ onValueChange={(selectedIds) => {
const selectedTags = selectedIds.map((id) => Number(id)); // Convert back to numbers
setTags(selectedTags);
}}
@@ -301,13 +304,12 @@ export default function QuestionPage() {
) : (
{question.tags.map((s) => (
-
+
{s.name}
))}
)}
-
Asked: {new Date(question.createdAt).toLocaleDateString()}
@@ -318,19 +320,31 @@ export default function QuestionPage() {
{isEditing ? (
-
{isPreviewMode ? (
-
+
) : (
-
+
)}
) : (
@@ -349,13 +363,12 @@ export default function QuestionPage() {
) : (
selfProfile?.id === question.author.id && (
-