From 16a634468762d9d016405318491d88add92ec023 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 16 Dec 2025 00:10:42 +0200 Subject: [PATCH] fix(layout/badges): not reacting to changes in share --- apps/client/src/widgets/shared_info.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/client/src/widgets/shared_info.tsx b/apps/client/src/widgets/shared_info.tsx index cd6cf78f4..54c6da785 100644 --- a/apps/client/src/widgets/shared_info.tsx +++ b/apps/client/src/widgets/shared_info.tsx @@ -1,10 +1,12 @@ import "./shared_info.css"; -import { t } from "../services/i18n"; + import { useEffect, useState } from "preact/hooks"; -import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks"; -import attributes from "../services/attributes"; + import FNote from "../entities/fnote"; +import attributes from "../services/attributes"; +import { t } from "../services/i18n"; import HelpButton from "./react/HelpButton"; +import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks"; import InfoBar from "./react/InfoBar"; import RawHtml from "./react/RawHtml"; @@ -16,8 +18,8 @@ export default function SharedInfo() { {link && ( + ? t("shared_info.shared_publicly", { link }) + : t("shared_info.shared_locally", { link })} /> )} @@ -33,6 +35,7 @@ export function useShareInfo(note: FNote | null | undefined) { if (!note) return; if (note.noteId === "_share" || !note?.hasAncestor("_share")) { setLink(undefined); + setLinkHref(undefined); return; }