Skip to content

Commit

Permalink
feat: fixes for bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
arn4b committed Aug 3, 2023
1 parent 5185edb commit d3db2dd
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 248 deletions.
45 changes: 23 additions & 22 deletions packages/uiweb/src/lib/components/space/SpaceFeed/SpaceFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ export const SpaceFeed: React.FC<ISpaceFeedProps> = ({
padding: "10px",
}}
>
{orientation === OrientationEnums.Horizontal ? (
<Spaces orientation={orientation}>
{orientation === OrientationEnums.Horizontal
? mySpaces &&
{orientation === OrientationEnums.Horizontal ? (
<Spaces orientation={orientation}>
{orientation === OrientationEnums.Horizontal
? mySpaces &&
mySpaces.apiData?.map((space: SpaceIFeeds) => {
return (
<SpaceBanner
Expand All @@ -202,7 +202,7 @@ export const SpaceFeed: React.FC<ISpaceFeedProps> = ({
/>
);
})
: mySpaces &&
: mySpaces &&
mySpaces.apiData?.map((space: SpaceIFeeds) => {
return (
<SpaceBanner
Expand All @@ -214,23 +214,23 @@ export const SpaceFeed: React.FC<ISpaceFeedProps> = ({
/>
);
})}
</Spaces>
) : (
<>
<Navigation showTabs={showTabs} width={width} showFilter={showFilter}>
<NavButtonWrapper>
{sortingOrder.map((tabName: TabsValues) => {
return (
<NavButton
active={selectedFeedTab === FeedTabs[tabName]}
onClick={() => setSelectedFeedTab(FeedTabs[tabName])}
>
{FeedTabs[tabName]}
</NavButton>
);
})}
</NavButtonWrapper>
</Navigation>
</Spaces>
) : (
<>
<Navigation showTabs={showTabs} width={width} showFilter={showFilter}>
<NavButtonWrapper>
{sortingOrder.map((tabName: TabsValues) => {
return (
<NavButton
active={selectedFeedTab === FeedTabs[tabName]}
onClick={() => setSelectedFeedTab(FeedTabs[tabName])}
>
{FeedTabs[tabName]}
</NavButton>
);
})}
</NavButtonWrapper>
</Navigation>
<Filter showFilter={showFilter}>
<FilterButton
active={filterTab === FilterEnums.All}
Expand Down Expand Up @@ -339,6 +339,7 @@ export const SpaceFeed: React.FC<ISpaceFeedProps> = ({
</Spaces>
)}
{loading && <Spinner size="40" />}

</Container>
</ScrollContainer>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@ export const LiveSpaceProfileContainer = (

const {
spacesObjectRef,
} = useSpaceData();
} = useSpaceData();

const handleDDState = () => {
setIsDDOpen(!isDDOpen);
};

const inviteListener = async () => {
await spacesObjectRef?.current?.inviteToPromote?.({ role: 'SPEAKER', inviteeAddress: pCAIP10ToWallet(wallet) })
}
}

useEffect(() => {
const handleOutsideClick = (event: any) => {
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
setIsDDOpen(false);
}
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
setIsDDOpen(false);
}
};

document.addEventListener('mousedown', handleOutsideClick);

return () => {
document.removeEventListener('mousedown', handleOutsideClick);
document.removeEventListener('mousedown', handleOutsideClick);
};
}, []);
}, []);

return (
<ThemeProvider theme={theme}>
Expand All @@ -82,7 +82,7 @@ export const LiveSpaceProfileContainer = (
cursor='pointer'
onClick={handleDDState}
/>
<Text fontSize={'16px'} marginTop={'12px'} fontWeight={600} color={`${theme.textColorPrimary}`}>
<Text fontSize={'16px'} marginTop={'12px'} fontWeight={600} color={`${theme.textColorPrimary}`}>
{wallet.replace('eip155:', '').slice(0, -36) + '...'}
{stream && <VideoPlayer videoCallData={stream} />}
</Text>
Expand Down Expand Up @@ -127,13 +127,13 @@ export const LiveSpaceProfileContainer = (
)}
</Item>

{/* {isDDOpen ? (
{isDDOpen ? (
<DropDown theme={theme} ref={dropdownRef} isDDOpen={isDDOpen}>
<DDItem onClick={inviteListener}>Invite to Speak</DDItem>
<DDItem>Kick Listener</DDItem>
<DDItem>Mute</DDItem>
{/* <DDItem>Mute</DDItem>
<DDItem>Kick Listener</DDItem> */}
</DropDown>
) : null} */}
) : null}
</ThemeProvider>
);
};
Expand Down
Loading

0 comments on commit d3db2dd

Please sign in to comment.