feat: replace alert with toast notification for copied link in Settings component
This commit is contained in:
@@ -76,6 +76,8 @@ import { Separator } from "@/components/ui/separator";
|
|||||||
import { Slider } from "@/components/ui/slider";
|
import { Slider } from "@/components/ui/slider";
|
||||||
import { NonOverflowScrollArea, ScrollArea } from "@/components/ui/scroll-area";
|
import { NonOverflowScrollArea, ScrollArea } from "@/components/ui/scroll-area";
|
||||||
import { AppChatStoreContext, AppContext } from "@/pages/App";
|
import { AppChatStoreContext, AppContext } from "@/pages/App";
|
||||||
|
import { toast } from "@/hooks/use-toast";
|
||||||
|
import { title } from "process";
|
||||||
|
|
||||||
const TTS_VOICES: string[] = [
|
const TTS_VOICES: string[] = [
|
||||||
"alloy",
|
"alloy",
|
||||||
@@ -886,7 +888,10 @@ export default (props: {}) => {
|
|||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(link);
|
navigator.clipboard.writeText(link);
|
||||||
alert(tr(`Copied link:`, langCode) + `${link}`);
|
toast({
|
||||||
|
title: tr(`Copied link:`, langCode),
|
||||||
|
description: `${link}`,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Tr("Copy Setting Link")}
|
{Tr("Copy Setting Link")}
|
||||||
|
|||||||
Reference in New Issue
Block a user