From 0b99fe783aaebc5baca40f9d1b837278811cd228 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 17 Mar 2024 08:43:10 +0000
Subject: ui(web): Change TagsEditor to auto save on edit and extract ActionBar
 to its own component

---
 .../components/dashboard/bookmarks/TextCard.tsx    | 23 ++--------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

(limited to 'apps/web/components/dashboard/bookmarks/TextCard.tsx')

diff --git a/apps/web/components/dashboard/bookmarks/TextCard.tsx b/apps/web/components/dashboard/bookmarks/TextCard.tsx
index 5028c1bb..75733063 100644
--- a/apps/web/components/dashboard/bookmarks/TextCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/TextCard.tsx
@@ -1,17 +1,15 @@
 "use client";
 
 import { useState } from "react";
-import Link from "next/link";
 import { isBookmarkStillTagging } from "@/lib/bookmarkUtils";
 import { api } from "@/lib/trpc";
 import { cn } from "@/lib/utils";
-import { Maximize2, Star } from "lucide-react";
 import Markdown from "react-markdown";
 
 import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
 
+import BookmarkActionBar from "./BookmarkActionBar";
 import { BookmarkedTextViewer } from "./BookmarkedTextViewer";
-import BookmarkOptions from "./BookmarkOptions";
 import TagList from "./TagList";
 
 export default function TextCard({
@@ -71,24 +69,7 @@ export default function TextCard({
         </div>
         <div className="flex w-full justify-between">
           <div />
-          <div className="flex gap-0 text-gray-500">
-            <div>
-              {bookmark.favourited && (
-                <Star
-                  className="my-1 size-8 rounded p-1"
-                  color="#ebb434"
-                  fill="#ebb434"
-                />
-              )}
-            </div>
-            <Link
-              className="my-auto block px-2"
-              href={`/dashboard/preview/${bookmark.id}`}
-            >
-              <Maximize2 size="20" />
-            </Link>
-            <BookmarkOptions bookmark={bookmark} />
-          </div>
+          <BookmarkActionBar bookmark={bookmark} />
         </div>
       </div>
     </>
-- 
cgit v1.2.3-70-g09d2

