fix: short link only live streams
This commit is contained in:
@ -65,6 +65,7 @@ export function StreamTile({
|
||||
const [videoLink, setVideoLink] = useState(`/${link.encode()}`)
|
||||
|
||||
useEffect(() => {
|
||||
if (status === StreamState.Live) {
|
||||
fetchNostrAddresByPubkey(host, NIP5_DOMAIN).then((h) => {
|
||||
if (h) {
|
||||
const names = Object.entries(h.names);
|
||||
@ -72,8 +73,11 @@ export function StreamTile({
|
||||
setVideoLink(`/${names[0][0]}`);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}, [videoLink]);
|
||||
}
|
||||
}, [status, videoLink]);
|
||||
|
||||
const [hasImg, setHasImage] = useState((image?.length ?? 0) > 0 || (recording?.length ?? 0) > 0);
|
||||
return (
|
||||
<div
|
||||
|
Reference in New Issue
Block a user