aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-04-18 10:01:45 +0100
committerMohamedBassem <me@mbassem.com>2024-04-18 10:01:45 +0100
commitdeba31ee010f785a9739fd4df8a64a3056c9593d (patch)
tree647499476af517b045a784591e0f8538551f69a4 /apps/web/components/dashboard
parent81fc4c45269fcd2b9cb9b6a001f8208f6b2b04a3 (diff)
downloadkarakeep-deba31ee010f785a9739fd4df8a64a3056c9593d.tar.zst
refactor: Move the shared types to the shared package
Diffstat (limited to 'apps/web/components/dashboard')
-rw-r--r--apps/web/components/dashboard/UploadDropzone.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/AssetCard.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx5
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/Bookmarks.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/LinkCard.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/TagList.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/TagModal.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/TagsEditor.tsx4
-rw-r--r--apps/web/components/dashboard/bookmarks/TextCard.tsx2
-rw-r--r--apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx2
-rw-r--r--apps/web/components/dashboard/lists/AllListsView.tsx2
-rw-r--r--apps/web/components/dashboard/lists/DeleteListButton.tsx2
-rw-r--r--apps/web/components/dashboard/preview/ActionBar.tsx2
-rw-r--r--apps/web/components/dashboard/preview/AssetContentSection.tsx2
-rw-r--r--apps/web/components/dashboard/preview/BookmarkPreview.tsx2
-rw-r--r--apps/web/components/dashboard/preview/EditableTitle.tsx2
-rw-r--r--apps/web/components/dashboard/preview/NoteEditor.tsx2
-rw-r--r--apps/web/components/dashboard/preview/TextContentSection.tsx2
-rw-r--r--apps/web/components/dashboard/settings/ChangePassword.tsx2
-rw-r--r--apps/web/components/dashboard/sidebar/AllLists.tsx2
-rw-r--r--apps/web/components/dashboard/tags/AllTagsView.tsx2
25 files changed, 29 insertions, 26 deletions
diff --git a/apps/web/components/dashboard/UploadDropzone.tsx b/apps/web/components/dashboard/UploadDropzone.tsx
index f6243885..be30a77f 100644
--- a/apps/web/components/dashboard/UploadDropzone.tsx
+++ b/apps/web/components/dashboard/UploadDropzone.tsx
@@ -10,7 +10,7 @@ import { useCreateBookmarkWithPostHook } from "@hoarder/shared-react/hooks/bookm
import {
zUploadErrorSchema,
zUploadResponseSchema,
-} from "@hoarder/trpc/types/uploads";
+} from "@hoarder/shared/types/uploads";
import LoadingSpinner from "../ui/spinner";
import { toast } from "../ui/use-toast";
diff --git a/apps/web/components/dashboard/bookmarks/AssetCard.tsx b/apps/web/components/dashboard/bookmarks/AssetCard.tsx
index ea0317aa..c9a43575 100644
--- a/apps/web/components/dashboard/bookmarks/AssetCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/AssetCard.tsx
@@ -7,7 +7,7 @@ import { api } from "@/lib/trpc";
import type {
ZBookmark,
ZBookmarkTypeAsset,
-} from "@hoarder/trpc/types/bookmarks";
+} from "@hoarder/shared/types/bookmarks";
import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard";
diff --git a/apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx b/apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx
index 420fed84..d4e8dfca 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarkActionBar.tsx
@@ -3,7 +3,7 @@ import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { Maximize2 } from "lucide-react";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import BookmarkOptions from "./BookmarkOptions";
import { FavouritedActionIcon } from "./icons";
diff --git a/apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx b/apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx
index 3d7b93f3..42c4db21 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarkLayoutAdaptingCard.tsx
@@ -9,7 +9,7 @@ import {
import { cn } from "@/lib/utils";
import dayjs from "dayjs";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import BookmarkActionBar from "./BookmarkActionBar";
import TagList from "./TagList";
diff --git a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
index a8ec1ab5..6f07107b 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarkOptions.tsx
@@ -21,7 +21,10 @@ import {
Trash2,
} from "lucide-react";
-import type { ZBookmark, ZBookmarkedLink } from "@hoarder/trpc/types/bookmarks";
+import type {
+ ZBookmark,
+ ZBookmarkedLink,
+} from "@hoarder/shared/types/bookmarks";
import {
useDeleteBookmark,
useRecrawlBookmark,
diff --git a/apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx b/apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx
index 294f2b5a..db69e1a3 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarkedTextEditor.tsx
@@ -14,7 +14,7 @@ import { Textarea } from "@/components/ui/textarea";
import { toast } from "@/components/ui/use-toast";
import { api } from "@/lib/trpc";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
export function BookmarkedTextEditor({
bookmark,
diff --git a/apps/web/components/dashboard/bookmarks/Bookmarks.tsx b/apps/web/components/dashboard/bookmarks/Bookmarks.tsx
index 8aa723e9..6a9266b9 100644
--- a/apps/web/components/dashboard/bookmarks/Bookmarks.tsx
+++ b/apps/web/components/dashboard/bookmarks/Bookmarks.tsx
@@ -3,7 +3,7 @@ import { Separator } from "@/components/ui/separator";
import { api } from "@/server/api/client";
import { getServerAuthSession } from "@/server/auth";
-import type { ZGetBookmarksRequest } from "@hoarder/trpc/types/bookmarks";
+import type { ZGetBookmarksRequest } from "@hoarder/shared/types/bookmarks";
import UpdatableBookmarksGrid from "./UpdatableBookmarksGrid";
diff --git a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
index 01f18815..b44dea33 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
@@ -9,7 +9,7 @@ import { Slot } from "@radix-ui/react-slot";
import Masonry from "react-masonry-css";
import resolveConfig from "tailwindcss/resolveConfig";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import AssetCard from "./AssetCard";
import EditorCard from "./EditorCard";
diff --git a/apps/web/components/dashboard/bookmarks/LinkCard.tsx b/apps/web/components/dashboard/bookmarks/LinkCard.tsx
index 6d51695d..ef0ae6f2 100644
--- a/apps/web/components/dashboard/bookmarks/LinkCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/LinkCard.tsx
@@ -7,7 +7,7 @@ import {
} from "@/lib/bookmarkUtils";
import { api } from "@/lib/trpc";
-import type { ZBookmarkTypeLink } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmarkTypeLink } from "@hoarder/shared/types/bookmarks";
import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard";
diff --git a/apps/web/components/dashboard/bookmarks/TagList.tsx b/apps/web/components/dashboard/bookmarks/TagList.tsx
index e0387bd2..ff63d110 100644
--- a/apps/web/components/dashboard/bookmarks/TagList.tsx
+++ b/apps/web/components/dashboard/bookmarks/TagList.tsx
@@ -3,7 +3,7 @@ import { badgeVariants } from "@/components/ui/badge";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
export default function TagList({
bookmark,
diff --git a/apps/web/components/dashboard/bookmarks/TagModal.tsx b/apps/web/components/dashboard/bookmarks/TagModal.tsx
index 6bc16a89..00cc40fc 100644
--- a/apps/web/components/dashboard/bookmarks/TagModal.tsx
+++ b/apps/web/components/dashboard/bookmarks/TagModal.tsx
@@ -9,7 +9,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import { TagsEditor } from "./TagsEditor";
diff --git a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
index ab7dd754..ec1c3bfa 100644
--- a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
+++ b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
@@ -6,8 +6,8 @@ import { cn } from "@/lib/utils";
import { Sparkles } from "lucide-react";
import CreateableSelect from "react-select/creatable";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
-import type { ZAttachedByEnum } from "@hoarder/trpc/types/tags";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
+import type { ZAttachedByEnum } from "@hoarder/shared/types/tags";
import { useUpdateBookmarkTags } from "@hoarder/shared-react/hooks/bookmarks";
interface EditableTag {
diff --git a/apps/web/components/dashboard/bookmarks/TextCard.tsx b/apps/web/components/dashboard/bookmarks/TextCard.tsx
index e24108d2..9d5c8d8b 100644
--- a/apps/web/components/dashboard/bookmarks/TextCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/TextCard.tsx
@@ -7,7 +7,7 @@ import { bookmarkLayoutSwitch } from "@/lib/userLocalSettings/bookmarksLayout";
import { cn } from "@/lib/utils";
import Markdown from "react-markdown";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import { BookmarkedTextViewer } from "./BookmarkedTextViewer";
import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard";
diff --git a/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx b/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx
index fe69201c..53524490 100644
--- a/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx
+++ b/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx
@@ -6,7 +6,7 @@ import { api } from "@/lib/trpc";
import type {
ZGetBookmarksRequest,
ZGetBookmarksResponse,
-} from "@hoarder/trpc/types/bookmarks";
+} from "@hoarder/shared/types/bookmarks";
import { BookmarkGridContextProvider } from "@hoarder/shared-react/hooks/bookmark-grid-context";
import BookmarksGrid from "./BookmarksGrid";
diff --git a/apps/web/components/dashboard/lists/AllListsView.tsx b/apps/web/components/dashboard/lists/AllListsView.tsx
index 4159bc14..00e76a23 100644
--- a/apps/web/components/dashboard/lists/AllListsView.tsx
+++ b/apps/web/components/dashboard/lists/AllListsView.tsx
@@ -7,7 +7,7 @@ import { api } from "@/lib/trpc";
import { keepPreviousData } from "@tanstack/react-query";
import { Plus } from "lucide-react";
-import type { ZBookmarkList } from "@hoarder/trpc/types/lists";
+import type { ZBookmarkList } from "@hoarder/shared/types/lists";
function ListItem({
name,
diff --git a/apps/web/components/dashboard/lists/DeleteListButton.tsx b/apps/web/components/dashboard/lists/DeleteListButton.tsx
index ee2a9ec7..774b79ac 100644
--- a/apps/web/components/dashboard/lists/DeleteListButton.tsx
+++ b/apps/web/components/dashboard/lists/DeleteListButton.tsx
@@ -8,7 +8,7 @@ import { toast } from "@/components/ui/use-toast";
import { api } from "@/lib/trpc";
import { Trash2 } from "lucide-react";
-import type { ZBookmarkList } from "@hoarder/trpc/types/lists";
+import type { ZBookmarkList } from "@hoarder/shared/types/lists";
export default function DeleteListButton({ list }: { list: ZBookmarkList }) {
const router = useRouter();
diff --git a/apps/web/components/dashboard/preview/ActionBar.tsx b/apps/web/components/dashboard/preview/ActionBar.tsx
index d2048cad..ec659e35 100644
--- a/apps/web/components/dashboard/preview/ActionBar.tsx
+++ b/apps/web/components/dashboard/preview/ActionBar.tsx
@@ -7,7 +7,7 @@ import {
import { toast } from "@/components/ui/use-toast";
import { Trash2 } from "lucide-react";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import {
useDeleteBookmark,
useUpdateBookmark,
diff --git a/apps/web/components/dashboard/preview/AssetContentSection.tsx b/apps/web/components/dashboard/preview/AssetContentSection.tsx
index 4a025f9d..94bd16ce 100644
--- a/apps/web/components/dashboard/preview/AssetContentSection.tsx
+++ b/apps/web/components/dashboard/preview/AssetContentSection.tsx
@@ -1,6 +1,6 @@
import Image from "next/image";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
export function AssetContentSection({ bookmark }: { bookmark: ZBookmark }) {
if (bookmark.content.type != "asset") {
diff --git a/apps/web/components/dashboard/preview/BookmarkPreview.tsx b/apps/web/components/dashboard/preview/BookmarkPreview.tsx
index 93f14c64..29e8e39a 100644
--- a/apps/web/components/dashboard/preview/BookmarkPreview.tsx
+++ b/apps/web/components/dashboard/preview/BookmarkPreview.tsx
@@ -20,7 +20,7 @@ import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { CalendarDays, ExternalLink } from "lucide-react";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import ActionBar from "./ActionBar";
import { AssetContentSection } from "./AssetContentSection";
diff --git a/apps/web/components/dashboard/preview/EditableTitle.tsx b/apps/web/components/dashboard/preview/EditableTitle.tsx
index 1500212d..071b3ca3 100644
--- a/apps/web/components/dashboard/preview/EditableTitle.tsx
+++ b/apps/web/components/dashboard/preview/EditableTitle.tsx
@@ -11,7 +11,7 @@ import { toast } from "@/components/ui/use-toast";
import { Check, Pencil, X } from "lucide-react";
import { useUpdateBookmark } from "@hoarder/shared-react/hooks/bookmarks";
-import { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import { ZBookmark } from "@hoarder/shared/types/bookmarks";
interface Props {
bookmarkId: string;
diff --git a/apps/web/components/dashboard/preview/NoteEditor.tsx b/apps/web/components/dashboard/preview/NoteEditor.tsx
index 6011e89d..67da40cc 100644
--- a/apps/web/components/dashboard/preview/NoteEditor.tsx
+++ b/apps/web/components/dashboard/preview/NoteEditor.tsx
@@ -2,7 +2,7 @@ import { Textarea } from "@/components/ui/textarea";
import { toast } from "@/components/ui/use-toast";
import { useClientConfig } from "@/lib/clientConfig";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
import { useUpdateBookmark } from "@hoarder/shared-react/hooks/bookmarks";
export function NoteEditor({ bookmark }: { bookmark: ZBookmark }) {
diff --git a/apps/web/components/dashboard/preview/TextContentSection.tsx b/apps/web/components/dashboard/preview/TextContentSection.tsx
index 35ee1b33..a73ad722 100644
--- a/apps/web/components/dashboard/preview/TextContentSection.tsx
+++ b/apps/web/components/dashboard/preview/TextContentSection.tsx
@@ -1,7 +1,7 @@
import { ScrollArea } from "@radix-ui/react-scroll-area";
import Markdown from "react-markdown";
-import type { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
export function TextContentSection({ bookmark }: { bookmark: ZBookmark }) {
let content;
diff --git a/apps/web/components/dashboard/settings/ChangePassword.tsx b/apps/web/components/dashboard/settings/ChangePassword.tsx
index 5d9324e6..070caee8 100644
--- a/apps/web/components/dashboard/settings/ChangePassword.tsx
+++ b/apps/web/components/dashboard/settings/ChangePassword.tsx
@@ -17,7 +17,7 @@ import { api } from "@/lib/trpc";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
-import { zChangePasswordSchema } from "@hoarder/trpc/types/users";
+import { zChangePasswordSchema } from "@hoarder/shared/types/users";
export function ChangePassword() {
const form = useForm<z.infer<typeof zChangePasswordSchema>>({
diff --git a/apps/web/components/dashboard/sidebar/AllLists.tsx b/apps/web/components/dashboard/sidebar/AllLists.tsx
index 2b38ed46..6ab42851 100644
--- a/apps/web/components/dashboard/sidebar/AllLists.tsx
+++ b/apps/web/components/dashboard/sidebar/AllLists.tsx
@@ -4,7 +4,7 @@ import Link from "next/link";
import { api } from "@/lib/trpc";
import { Plus } from "lucide-react";
-import type { ZBookmarkList } from "@hoarder/trpc/types/lists";
+import type { ZBookmarkList } from "@hoarder/shared/types/lists";
import NewListModal, { useNewListModal } from "./NewListModal";
import SidebarItem from "./SidebarItem";
diff --git a/apps/web/components/dashboard/tags/AllTagsView.tsx b/apps/web/components/dashboard/tags/AllTagsView.tsx
index 0f9ee823..73bfb7e6 100644
--- a/apps/web/components/dashboard/tags/AllTagsView.tsx
+++ b/apps/web/components/dashboard/tags/AllTagsView.tsx
@@ -5,7 +5,7 @@ import InfoTooltip from "@/components/ui/info-tooltip";
import { Separator } from "@/components/ui/separator";
import { api } from "@/lib/trpc";
-import type { ZGetTagResponse } from "@hoarder/trpc/types/tags";
+import type { ZGetTagResponse } from "@hoarder/shared/types/tags";
function TagPill({ name, count }: { name: string; count: number }) {
return (