Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): show mobile action toasts at the top

Gus9d8b226d54a8
diff --git a/src/web/src/components/toaster-provider.tsx b/src/web/src/components/toaster-provider.tsx
index 2854c76ad..b92461b22 100644
--- a/src/web/src/components/toaster-provider.tsx
+++ b/src/web/src/components/toaster-provider.tsx
@@ -2,16 +2,20 @@
import { Toaster } from "sonner";
import { useTheme } from "next-themes";
+import { useIsMobile } from "@/hooks/use-mobile";
export function ToasterProvider() {
const { resolvedTheme } = useTheme();
+ const isMobile = useIsMobile();
return (
<Toaster
theme={(resolvedTheme as "light" | "dark") ?? "system"}
richColors
closeButton
- position="bottom-right"
+ position={isMobile ? "top-center" : "bottom-right"}
+ offset={isMobile ? { top: "calc(env(safe-area-inset-top) + 16px)" } : undefined}
+ mobileOffset={{ top: "calc(env(safe-area-inset-top) + 16px)" }}
/>
);
}