Skip to content

Commit

Permalink
client-web: fix error on following route
Browse files Browse the repository at this point in the history
  • Loading branch information
franzos committed Aug 23, 2023
1 parent 1c0c3d0 commit 09ee6e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client-web/src/routes/following.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ export function FollowingRoute() {

const initDone = useRef<boolean>(false);

const relayId = (relayIds: string[]) => {
if (relayIds && relayIds.length > 0) {
return relayIds[0];
}
return "";
};

useEffect(() => {
const init = async () => {
if (initDone.current) return;
Expand All @@ -36,7 +43,7 @@ export function FollowingRoute() {
<User
user={item.user}
key={item.user.pubkey}
relayId={item.relayIds[0]}
relayId={relayId(item.relayIds)}
/>
</Box>
))}
Expand Down

0 comments on commit 09ee6e5

Please sign in to comment.