fix: update icon styling in DocumentsTableShell and enhance mobile rendering conditions in OnboardingTour

This commit is contained in:
Anish Sarkar 2026-02-06 19:25:01 +05:30
parent f7278f75f4
commit e3dc2ad39f
2 changed files with 5 additions and 3 deletions

View file

@ -467,7 +467,7 @@ export function DocumentsTableShell({
className="flex flex-col items-center gap-4 max-w-md px-4 text-center" className="flex flex-col items-center gap-4 max-w-md px-4 text-center"
> >
<div className="rounded-full bg-muted/50 p-4"> <div className="rounded-full bg-muted/50 p-4">
<FileX className="h-8 w-8 text-muted-foreground/60" /> <FileX className="h-8 w-8 text-muted-foreground" />
</div> </div>
<div className="space-y-1.5"> <div className="space-y-1.5">
<h3 className="text-lg font-semibold">{t("no_documents")}</h3> <h3 className="text-lg font-semibold">{t("no_documents")}</h3>

View file

@ -10,6 +10,7 @@ import { connectorsAtom } from "@/atoms/connectors/connector-query.atoms";
import { documentTypeCountsAtom } from "@/atoms/documents/document-query.atoms"; import { documentTypeCountsAtom } from "@/atoms/documents/document-query.atoms";
import { activeSearchSpaceIdAtom } from "@/atoms/search-spaces/search-space-query.atoms"; import { activeSearchSpaceIdAtom } from "@/atoms/search-spaces/search-space-query.atoms";
import { currentUserAtom } from "@/atoms/user/user-query.atoms"; import { currentUserAtom } from "@/atoms/user/user-query.atoms";
import { useIsMobile } from "@/hooks/use-mobile";
import { fetchThreads } from "@/lib/chat/thread-persistence"; import { fetchThreads } from "@/lib/chat/thread-persistence";
interface TourStep { interface TourStep {
@ -393,6 +394,7 @@ function TourTooltip({
} }
export function OnboardingTour() { export function OnboardingTour() {
const isMobile = useIsMobile();
const [isActive, setIsActive] = useState(false); const [isActive, setIsActive] = useState(false);
const [stepIndex, setStepIndex] = useState(0); const [stepIndex, setStepIndex] = useState(0);
const [targetEl, setTargetEl] = useState<Element | null>(null); const [targetEl, setTargetEl] = useState<Element | null>(null);
@ -685,8 +687,8 @@ export function OnboardingTour() {
return () => window.removeEventListener("keydown", handleKeyDown); return () => window.removeEventListener("keydown", handleKeyDown);
}, [isActive, user?.id]); }, [isActive, user?.id]);
// Don't render if not active or not mounted // Don't render on mobile, or if not active or not mounted
if (!mounted || !isActive) { if (isMobile || !mounted || !isActive) {
return null; return null;
} }