diff --git a/src/components/Inputs/MaterialInput.tsx b/src/components/Inputs/MaterialInput.tsx index c8535c5..925f410 100644 --- a/src/components/Inputs/MaterialInput.tsx +++ b/src/components/Inputs/MaterialInput.tsx @@ -249,7 +249,7 @@ export const InlineSelectInput = ({ { diff --git a/src/components/VideoPlayer/VideoPlayer.tsx b/src/components/VideoPlayer/VideoPlayer.tsx index 5772bdf..aebdda1 100644 --- a/src/components/VideoPlayer/VideoPlayer.tsx +++ b/src/components/VideoPlayer/VideoPlayer.tsx @@ -103,29 +103,11 @@ const VideoPlayer = ({ source, metaData, isLoading, thumbnail }: Props) => { crossOrigin='anonymous' preload='auto' autoPlay - className='w-full h-full aspect-video' + className={`aspect-video ${ + !isPlaylistExist ? '2xl:h-[80vh]' : 'h-full ' + }`} > - {/* */} - {/* - - */} - {query.has('p') && ( + {isPlaylistExist && ( { />
-

{profile?.fullname}

+

+ {profile?.fullname} +

- + @{profile?.username} - + {profile.totalFollowers} followers - + {profile.totalVideos} videos

- {profile.about} + + {profile.about} + @@ -109,7 +113,7 @@ const ChannelProfile = () => {
-
+
diff --git a/src/pages/profiles/channel/partials/ChannelNav.tsx b/src/pages/profiles/channel/partials/ChannelNav.tsx index f5090ff..78566d8 100644 --- a/src/pages/profiles/channel/partials/ChannelNav.tsx +++ b/src/pages/profiles/channel/partials/ChannelNav.tsx @@ -3,60 +3,67 @@ import { NavLink } from 'react-router-dom'; const ChannelNav = () => { return ( -
    - - !isActive - ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium' - : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2' - } - > - HOME - - - !isActive - ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium' - : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2' - } - > - VIDEOS - - - !isActive - ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium' - : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2' - } - > - PLAYLISTS - - {/* ( - !isActive ? "text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium" : "text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2" - )}>CHANNELS */} - - !isActive - ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium' - : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2' - } - > - ABOUT - - - !isActive - ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium' - : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 font-medium px-5 py-2' - } - > - - +
      +
    • + + !isActive + ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium dark:text-slate-300' + : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 dark:bg-dark-overlay-100 dark:hover:bg-dark-overlay-200 dark:text-slate-300 dark:border-dark-text/70 font-medium px-5 py-2' + } + > + HOME + +
    • +
    • + + !isActive + ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium dark:text-slate-300' + : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 dark:bg-dark-overlay-100 dark:hover:bg-dark-overlay-200 dark:text-slate-300 dark:border-dark-text/70 font-medium px-5 py-2' + } + > + VIDEOS + +
    • +
    • + + !isActive + ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium dark:text-slate-300' + : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 dark:bg-dark-overlay-100 dark:hover:bg-dark-overlay-200 dark:text-slate-300 dark:border-dark-text/70 font-medium px-5 py-2' + } + > + PLAYLISTS + +
    • +
    • + + !isActive + ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium dark:text-slate-300' + : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 dark:bg-dark-overlay-100 dark:hover:bg-dark-overlay-200 dark:text-slate-300 dark:border-dark-text/70 font-medium px-5 py-2' + } + > + ABOUT + +
    • +
    • + + !isActive + ? 'text-gray-700/90 border-b-2 border-transparent px-5 py-2 font-medium dark:text-slate-300' + : 'text-gray-800 border-b-2 border-gray-700 bg-gray-700/10 dark:bg-dark-overlay-100 dark:hover:bg-dark-overlay-200 dark:text-slate-300 dark:border-dark-text/70 font-medium px-5 py-2' + } + > + + +
    ); }; diff --git a/src/pages/profiles/channel/upload/UploadVideo.tsx b/src/pages/profiles/channel/upload/UploadVideo.tsx index 6d3c031..f350e0e 100644 --- a/src/pages/profiles/channel/upload/UploadVideo.tsx +++ b/src/pages/profiles/channel/upload/UploadVideo.tsx @@ -270,7 +270,7 @@ const UploadVideo = () => { return (
    -
    +
    {/* upload process info */}
    @@ -323,7 +323,7 @@ const UploadVideo = () => {
    {/* upload metadata info */} -
    +
    {/* video metadata form */}

    @@ -366,7 +366,7 @@ const UploadVideo = () => { />

    {/* video metadata aside */} -
    +

    More Settings

    diff --git a/src/pages/profiles/channel/upload/partials/AudienceSetting.tsx b/src/pages/profiles/channel/upload/partials/AudienceSetting.tsx index 4709773..3c0551a 100644 --- a/src/pages/profiles/channel/upload/partials/AudienceSetting.tsx +++ b/src/pages/profiles/channel/upload/partials/AudienceSetting.tsx @@ -9,7 +9,7 @@ type Props = { const AudienceSetting = ({ status, handle }: Props) => { return ( -
    +
    {status === 'PUBLIC' ? ( diff --git a/src/pages/profiles/video/partials/Playlist.tsx b/src/pages/profiles/video/partials/Playlist.tsx index 09b1858..fe59da6 100644 --- a/src/pages/profiles/video/partials/Playlist.tsx +++ b/src/pages/profiles/video/partials/Playlist.tsx @@ -1,5 +1,5 @@ import dayjs from 'dayjs'; -import { useEffect, useRef, useState } from 'react'; +import { memo, useEffect, useRef, useState } from 'react'; import { FiChevronDown, FiX } from 'react-icons/fi'; import PlaylistProfileThumbnail from '../../../../components/PlaylistProfileThumbnail'; import useQuery from '../../../../hooks/useQuery'; @@ -12,10 +12,16 @@ type PlaylistProps = { vidRef?: React.RefObject; }; -const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { +const Playlist: React.FC = memo(function Playlist({ + playlist, + isLoading, + vidRef, +}) { const query = useQuery(); const [playlistOpen, setPlaylistOpen] = useState(true); + console.log('rendering'); + const playlistRef = useRef(null); useEffect(() => { @@ -35,7 +41,7 @@ const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { `${resizeVidHeight! - 95}px` ); }); - }, [vidRef, vidRef?.current?.clientHeight]); + }, [vidRef, vidRef?.current?.clientHeight, playlistOpen]); if (isLoading) { return ( @@ -107,6 +113,5 @@ const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { )}
    ); -}; - +}); export default Playlist; diff --git a/src/pages/profiles/video/partials/VideoBody.tsx b/src/pages/profiles/video/partials/VideoBody.tsx index 7f2268b..4628672 100644 --- a/src/pages/profiles/video/partials/VideoBody.tsx +++ b/src/pages/profiles/video/partials/VideoBody.tsx @@ -23,27 +23,29 @@ const VideoBody: React.FC = ({ metaData }) => { {metaData.title}

    -
    -
    - - - -

    - - {metaData?.channel?.name} +

    +
    +
    + + - - {metaData.followers} followers - -

    +

    + + {metaData?.channel?.name} + + + {metaData.followers} followers + +

    +
    -
    +