diff --git a/src/components/ZapThreadsWrapper.js b/src/components/ZapThreadsWrapper.js
index b7cb409..2e94f0d 100644
--- a/src/components/ZapThreadsWrapper.js
+++ b/src/components/ZapThreadsWrapper.js
@@ -1,6 +1,6 @@
import React, { useEffect, useRef } from 'react';
-const ZapThreadsWrapper = ({ anchor, relays, disable }) => {
+const ZapThreadsWrapper = ({ anchor, user, relays, disable }) => {
// Create a ref to store the reference to the
element
const zapRef = useRef(null);
@@ -17,8 +17,9 @@ const ZapThreadsWrapper = ({ anchor, relays, disable }) => {
// Create a new element
const zapElement = document.createElement('zap-threads');
zapElement.setAttribute('anchor', anchor);
- zapElement.setAttribute('relays', relays);
- zapElement.setAttribute('disable', disable);
+ if (user) zapElement.setAttribute('user', user);
+ zapElement.setAttribute('relays', relays.replace(/\s/g, ''));
+ if (disable) zapElement.setAttribute('disable', disable);
// Remove any existing element before appending a new one
if (zapRef.current && zapRef.current.firstChild) {
@@ -48,7 +49,7 @@ const ZapThreadsWrapper = ({ anchor, relays, disable }) => {
// Remove the load event listener from the script
script.removeEventListener('load', handleScriptLoad);
};
- }, [anchor, relays, disable]);
+ }, [anchor, user, relays, disable]);
// Render a
element and attach the zapRef to it
return ;
diff --git a/src/components/feeds/messages/CommunityMessage.js b/src/components/feeds/messages/CommunityMessage.js
index 027ee1b..0e6f5f0 100644
--- a/src/components/feeds/messages/CommunityMessage.js
+++ b/src/components/feeds/messages/CommunityMessage.js
@@ -10,7 +10,6 @@ import NostrIcon from '../../../../public/images/nostr.png';
import Image from 'next/image';
import { nip19 } from 'nostr-tools';
import ZapThreadsWrapper from '@/components/ZapThreadsWrapper';
-import useWindowWidth from '@/hooks/useWindowWidth';
const StackerNewsIconComponent = () => (