aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/bookmarks/EditorCard.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/dashboard/bookmarks/EditorCard.tsx')
-rw-r--r--apps/web/components/dashboard/bookmarks/EditorCard.tsx15
1 files changed, 2 insertions, 13 deletions
diff --git a/apps/web/components/dashboard/bookmarks/EditorCard.tsx b/apps/web/components/dashboard/bookmarks/EditorCard.tsx
index 8425f669..44d68378 100644
--- a/apps/web/components/dashboard/bookmarks/EditorCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/EditorCard.tsx
@@ -1,6 +1,5 @@
import type { SubmitErrorHandler, SubmitHandler } from "react-hook-form";
import React, { useEffect, useImperativeHandle, useRef } from "react";
-import Link from "next/link";
import { ActionButton } from "@/components/ui/action-button";
import { Form, FormControl, FormItem } from "@/components/ui/form";
import InfoTooltip from "@/components/ui/info-tooltip";
@@ -8,11 +7,11 @@ import MultipleChoiceDialog from "@/components/ui/multiple-choice-dialog";
import { Separator } from "@/components/ui/separator";
import { Textarea } from "@/components/ui/textarea";
import { toast } from "@/components/ui/use-toast";
+import BookmarkAlreadyExistsToast from "@/components/utils/BookmarkAlreadyExistsToast";
import { useClientConfig } from "@/lib/clientConfig";
import { useBookmarkLayoutSwitch } from "@/lib/userLocalSettings/bookmarksLayout";
import { cn } from "@/lib/utils";
import { zodResolver } from "@hookform/resolvers/zod";
-import { ExternalLink } from "lucide-react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -64,17 +63,7 @@ export default function EditorCard({ className }: { className?: string }) {
onSuccess: (resp) => {
if (resp.alreadyExists) {
toast({
- description: (
- <div className="flex items-center gap-1">
- Bookmark already exists.
- <Link
- className="flex underline-offset-4 hover:underline"
- href={`/dashboard/preview/${resp.id}`}
- >
- Open <ExternalLink className="ml-1 size-4" />
- </Link>
- </div>
- ),
+ description: <BookmarkAlreadyExistsToast bookmarkId={resp.id} />,
variant: "default",
});
}