Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add close buttons to toasts #2023

Mergednoxire-dev(GitHub profile, opens in a new tab)merged 17 commits intomain fromrefs/pull/2023/headmerged by juliusmarminge View on GitHub

Showing 19 changed files with 86 additions and 62 deletions (loading 17).

x
0 of 19 viewed, 19 left
22 additions and 16 deletionsapps/web/src/components/chat/ProposedPlanCard.tsxModified
View file
@@ -24,7 +24,7 @@
DialogPopup,
DialogTitle,
} from "../ui/dialog";
-import { toastManager } from "../ui/toast";
+import { stackedThreadToast, toastManager } from "../ui/toast";
import { readEnvironmentApi } from "~/environmentApi";
import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
​
@@ -45,11 +45,13 @@
const [isSavingToWorkspace, setIsSavingToWorkspace] = useState(false);
const { copyToClipboard, isCopied } = useCopyToClipboard({
onError: (error) => {
- toastManager.add({
- type: "error",
- title: "Could not copy plan",
- description: error instanceof Error ? error.message : "An error occurred while copying.",
- });
+ toastManager.add(
+ stackedThreadToast({
+ type: "error",
+ title: "Could not copy plan",
+ description: error instanceof Error ? error.message : "An error occurred while copying.",
+ }),
+ );
},
});
const savePathInputId = useId();