fix: address widget review feedback

This commit is contained in:
Thomas Camlong committed 2026-08-03 20:04:56 +02:00
1 parent 596bfc317d
commit 454752e46d
2 files changed
+32 -16

No files matched your search

+5 -1
View File
@@ -1,5 +1,6 @@
"use client";
import { useMemo } from "react";
import {
Anchor,
Box,
@@ -99,7 +100,10 @@ export default function BookmarksWidget({
[data],
);
const compactLayout = getCompactBookmarkLayout(width, height, data.length, options.layout);
const compactLayout = useMemo(
() => getCompactBookmarkLayout(width, height, data.length, options.layout),
[width, height, data.length, options.layout],
);
const compactHideTitle = options.hideTitle || (compactLayout.hideTitle && !options.hideIcon);
const compactHideHostname =
options.hideHostname || (compactLayout.hideHostname && !(options.hideTitle && options.hideIcon));