Skip to content

Commit

Permalink
simplify api
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwidlund committed May 25, 2024
1 parent 7831204 commit b9baff5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/web/src/windows/ImageWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ export const ImageWindow = observer(
const [imageSrc, setImageSrc] = useState<string>();

useEffect(() => {
const subscription = node.outputs.output.subscribe(url => {
setImageSrc(url);
});
const subscription = node.outputs.output.subscribe(setImageSrc);

return () => {
subscription.unsubscribe();
Expand Down

0 comments on commit b9baff5

Please sign in to comment.