mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[chore] rework useObservable hook to properly re-subsrive when the state change
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ export const BsContentTabItem: BsContentTabItemComponent = ({ text, icon: Icon,
|
||||
{linkProps && (
|
||||
<div className="flex items-center absolute top-1.5 left-1.5">
|
||||
<LinkButton
|
||||
state$={linkProps.state$}
|
||||
state={linkProps.state}
|
||||
className={linkProps.className ?? "block w-6 h-6 aspect-square blur-0 cursor-pointer hover:brightness-75"}
|
||||
title={linkProps.title}
|
||||
onClick={linkProps.onClick}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { LinkOpenerService } from "renderer/services/link-opener.service";
|
||||
export function BsmIframeView() {
|
||||
const linkService = useService(LinkOpenerService);
|
||||
|
||||
const iframeUrl = useObservable(linkService.iframeLink$);
|
||||
const iframeUrl = useObservable(() => linkService.iframeLink$);
|
||||
const ref = useRef(null);
|
||||
useClickOutside(ref, () => linkService.closeIframe());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user