mirror of
https://github.com/Qortal/q-tube.git
synced 2025-02-11 17:55:51 +00:00
Added link to channel page
This commit is contained in:
parent
6fc4f00dc2
commit
9ec82d8e17
@ -65,8 +65,8 @@ const NavBar: React.FC<Props> = ({
|
||||
const [openUserDropdown, setOpenUserDropdown] = useState<boolean>(false);
|
||||
const [isOpenBlockedNamesModal, setIsOpenBlockedNamesModal] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const [anchorElNotification, setAnchorElNotification] =
|
||||
|
||||
const [anchorElNotification, setAnchorElNotification] =
|
||||
React.useState<HTMLButtonElement | null>(null);
|
||||
const filterValue = useSelector(
|
||||
(state: RootState) => state.video.filterValue
|
||||
@ -94,6 +94,10 @@ const NavBar: React.FC<Props> = ({
|
||||
setOpenUserDropdown(false);
|
||||
};
|
||||
|
||||
const handleMyChannelLink = () => {
|
||||
navigate(`/channel/${userName}`);
|
||||
};
|
||||
|
||||
const onCloseBlockedNames = () => {
|
||||
setIsOpenBlockedNamesModal(false);
|
||||
};
|
||||
@ -415,6 +419,31 @@ const NavBar: React.FC<Props> = ({
|
||||
horizontal: "left",
|
||||
}}
|
||||
>
|
||||
<DropdownContainer
|
||||
onClick={() => {
|
||||
handleMyChannelLink();
|
||||
handleCloseUserDropdown();
|
||||
}}
|
||||
>
|
||||
{!userAvatar ? (
|
||||
<AccountCircleSVG
|
||||
color={theme.palette.text.primary}
|
||||
width="32"
|
||||
height="32"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
src={userAvatar}
|
||||
alt="User Avatar"
|
||||
width="32"
|
||||
height="32"
|
||||
style={{
|
||||
borderRadius: "50%",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<DropdownText>My Channel</DropdownText>
|
||||
</DropdownContainer>
|
||||
<DropdownContainer
|
||||
onClick={() => {
|
||||
setIsOpenBlockedNamesModal(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user