From 7bb785a533b86681a8e59511392cc7627b1d85f1 Mon Sep 17 00:00:00 2001 From: seeleng Date: Fri, 27 Sep 2024 21:38:50 +0800 Subject: [PATCH] feat: add question history empty state --- frontend/app/(authenticated)/questions/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/app/(authenticated)/questions/page.tsx b/frontend/app/(authenticated)/questions/page.tsx index 4f0c5b59..aac425dc 100644 --- a/frontend/app/(authenticated)/questions/page.tsx +++ b/frontend/app/(authenticated)/questions/page.tsx @@ -5,6 +5,7 @@ import { useQuery } from "@tanstack/react-query"; import { UserQuestionMiniDTO } from "@/client"; import ScrollToTopButton from "@/components/navigation/scroll-to-top-button"; +import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { LoadingSpinner } from "@/components/ui/loading-spinner"; import { getAnswers } from "@/queries/user-question"; @@ -54,6 +55,16 @@ function AllQuestions() { ) )} + {!isLoading && data!.length === 0 && ( + +

+ You don't have any past questions! +

+ + + +
+ )}