Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

small improvements

daniel31x13d207c89d8e14
diff --git a/apps/web/components/DashboardLayoutDropdown.tsx b/apps/web/components/DashboardLayoutDropdown.tsx
index 94248f40..803a622c 100644
--- a/apps/web/components/DashboardLayoutDropdown.tsx
+++ b/apps/web/components/DashboardLayoutDropdown.tsx
@@ -330,7 +330,7 @@ function DraggableListItem({
setDragOverPosition(null);
}}
className={`
- py-1 px-1 flex items-center justify-between
+ select-none py-1 px-1 flex items-center justify-between
${section.enabled ? "cursor-grab active:cursor-grabbing" : ""}
${draggedId === sectionId ? "opacity-70" : ""}
${indicatorClass}
diff --git a/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx b/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx
index ddf764bd..a5f977d9 100644
--- a/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx
+++ b/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx
@@ -97,9 +97,7 @@ export default function LinkActions({
className={clsx(className)}
onMouseDown={(e) => e.preventDefault()}
>
- <button>
- <i title="More" className="bi-three-dots text-xl" />
- </button>
+ <i title="More" className="bi-three-dots text-xl" />
</Button>
</DropdownMenuTrigger>
diff --git a/apps/web/pages/collections/[id].tsx b/apps/web/pages/collections/[id].tsx
index 4f2c1b9b..80c10f0f 100644
--- a/apps/web/pages/collections/[id].tsx
+++ b/apps/web/pages/collections/[id].tsx
@@ -150,9 +150,7 @@ export default function Index() {
onMouseDown={(e) => e.preventDefault()}
title={t("more")}
>
- <button>
- <i className="bi-three-dots text-xl" />
- </button>
+ <i className="bi-three-dots text-xl" />
</Button>
</DropdownMenuTrigger>
diff --git a/apps/web/pages/dashboard.tsx b/apps/web/pages/dashboard.tsx
index e3b0cbac..4e2298d8 100644
--- a/apps/web/pages/dashboard.tsx
+++ b/apps/web/pages/dashboard.tsx
@@ -78,15 +78,11 @@ export default function Dashboard() {
}
}, [user]);
- // Sort sections by order and filter enabled ones
const orderedSections = useMemo(() => {
- return dashboardSections.sort((a, b) => {
- if (a.order !== undefined && b.order !== undefined) {
- return a.order - b.order;
- }
- if (a.order !== undefined) return -1;
- if (b.order !== undefined) return 1;
- return 0;
+ return [...dashboardSections].sort((a, b) => {
+ const orderA = a.order ?? Number.MAX_SAFE_INTEGER;
+ const orderB = b.order ?? Number.MAX_SAFE_INTEGER;
+ return orderA - orderB;
});
}, [dashboardSections]);
diff --git a/apps/web/pages/tags/[id].tsx b/apps/web/pages/tags/[id].tsx
index ed4d866f..921d2ac3 100644
--- a/apps/web/pages/tags/[id].tsx
+++ b/apps/web/pages/tags/[id].tsx
@@ -181,9 +181,7 @@ export default function Index() {
size="icon"
title={t("more")}
>
- <button>
- <i className="bi-three-dots text-xl text-neutral" />
- </button>
+ <i className="bi-three-dots text-xl text-neutral" />
</Button>
</DropdownMenuTrigger>
diff --git a/packages/router/links.tsx b/packages/router/links.tsx
index 7a96725d..68f0ac26 100644
--- a/packages/router/links.tsx
+++ b/packages/router/links.tsx
@@ -239,9 +239,15 @@ type UseGetLinkParams = {
id: number;
isPublicRoute?: boolean;
auth?: MobileAuth;
+ enabled?: boolean;
};
-const useGetLink = ({ id, isPublicRoute = false, auth }: UseGetLinkParams) => {
+const useGetLink = ({
+ id,
+ isPublicRoute = false,
+ auth,
+ enabled = false,
+}: UseGetLinkParams) => {
const queryClient = useQueryClient();
return useQuery(
@@ -249,7 +255,7 @@ const useGetLink = ({ id, isPublicRoute = false, auth }: UseGetLinkParams) => {
{
queryKey: ["link", id, isPublicRoute],
placeholderData: {} as LinkIncludingShortenedCollectionAndTags,
- enabled: id != null,
+ enabled: id != null && enabled,
queryFn: async () => {
const base = auth?.instance ?? "";
const route = isPublicRoute