From 25fcd1f6853339dd167125692ea1c30ef8a06f81 Mon Sep 17 00:00:00 2001 From: ecwu Date: Fri, 24 Jan 2025 12:26:38 +0000 Subject: [PATCH] feat: replace alert with toast notification for copied link in Settings component --- src/components/Settings.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index c0ea76d..9318b02 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -76,6 +76,8 @@ import { Separator } from "@/components/ui/separator"; import { Slider } from "@/components/ui/slider"; import { NonOverflowScrollArea, ScrollArea } from "@/components/ui/scroll-area"; import { AppChatStoreContext, AppContext } from "@/pages/App"; +import { toast } from "@/hooks/use-toast"; +import { title } from "process"; const TTS_VOICES: string[] = [ "alloy", @@ -886,7 +888,10 @@ export default (props: {}) => { className="w-full" onClick={() => { navigator.clipboard.writeText(link); - alert(tr(`Copied link:`, langCode) + `${link}`); + toast({ + title: tr(`Copied link:`, langCode), + description: `${link}`, + }); }} > {Tr("Copy Setting Link")}