{isSuccess && data.data.data.length > 0 ? (
-
-
+ }
+ >
+
) : (
diff --git a/apps/app/src/components/UserQuestions/UserQuestionsList.tsx b/apps/app/src/components/UserQuestions/UserQuestionsList.tsx
index 8499f2c7..a7483a1f 100644
--- a/apps/app/src/components/UserQuestions/UserQuestionsList.tsx
+++ b/apps/app/src/components/UserQuestions/UserQuestionsList.tsx
@@ -10,9 +10,10 @@ import { UserQuestionLeftSection } from "./UserQuestionLeftSection";
type UserQuestionsListProps = Readonly<{
questions: APIQuestion[];
+ refetchQuestions: () => void;
}>;
-export const UserQuestionsList = memo(({ questions }: UserQuestionsListProps) => {
+export const UserQuestionsList = memo(({ questions, refetchQuestions }: UserQuestionsListProps) => {
const serializedQuestions = questions.map((question) =>
use(
(async () => {
@@ -29,7 +30,9 @@ export const UserQuestionsList = memo(({ questions }: UserQuestionsListProps) =>
}
+ leftSection={
+
+ }
rightSection={
diff --git a/apps/app/src/lib/question.ts b/apps/app/src/lib/question.ts
index 5306d395..bf378c66 100644
--- a/apps/app/src/lib/question.ts
+++ b/apps/app/src/lib/question.ts
@@ -7,7 +7,7 @@ export type QuestionStatus = typeof statuses[number];
export const serializeQuestionToMarkdown = async ({ question, ...rest }: APIQuestion) => {
const mdxContent = await serializeSource(question);
- return { mdxContent, ...rest };
+ return { mdxContent, question, ...rest };
};
export const parseStatusQuery = (query: QueryParam | null): QuestionStatus | null => {
diff --git a/apps/app/src/providers/UIProvider.tsx b/apps/app/src/providers/UIProvider.tsx
index 9392926c..1d9da2a8 100644
--- a/apps/app/src/providers/UIProvider.tsx
+++ b/apps/app/src/providers/UIProvider.tsx
@@ -3,7 +3,7 @@ import type { ReactNode } from "react";
import type { AdminQuestion } from "../types";
interface ModalData {
- AddQuestionModal: AdminQuestion;
+ AddQuestionModal: AdminQuestion & { additionalActionOnClose?: () => void };
AddQuestionConfirmationModal: never;
}