소스 검색

hide channel info of video preview in channel context

Klaudiusz Dembler 4 년 전
부모
커밋
08ff469f8a
3개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 1
      src/components/VideoGrid.tsx
  2. 1 1
      src/views/ChannelView/ChannelView.tsx
  3. 1 1
      src/views/VideoView/VideoView.tsx

+ 3 - 1
src/components/VideoGrid.tsx

@@ -11,8 +11,9 @@ const StyledVideoPreview = styled(VideoPreview)`
 
 type VideoGridProps = {
   videos: VideoFields[]
+  showChannel?: boolean
 }
-const VideoGrid: React.FC<VideoGridProps> = ({ videos }) => {
+const VideoGrid: React.FC<VideoGridProps> = ({ videos, showChannel = true }) => {
   return (
     <Grid>
       {videos.map((v, idx) => (
@@ -27,6 +28,7 @@ const VideoGrid: React.FC<VideoGridProps> = ({ videos }) => {
           duration={v.duration}
           views={v.views}
           posterURL={v.thumbnailURL}
+          showChannel={showChannel}
         />
       ))}
     </Grid>

+ 1 - 1
src/views/ChannelView/ChannelView.tsx

@@ -29,7 +29,7 @@ const ChannelView: React.FC<RouteComponentProps> = () => {
       </Header>
       {videos.length > 0 && (
         <VideoSection>
-          <VideoGrid videos={videos} />
+          <VideoGrid videos={videos} showChannel={false} />
         </VideoSection>
       )}
     </div>

+ 1 - 1
src/views/VideoView/VideoView.tsx

@@ -86,7 +86,7 @@ const VideoView: React.FC<RouteComponentProps> = () => {
         </DescriptionContainer>
         <MoreVideosContainer>
           <MoreVideosHeader>More from {channel.handle}</MoreVideosHeader>
-          <VideoGrid videos={channel.videos} />
+          <VideoGrid videos={channel.videos} showChannel={false} />
         </MoreVideosContainer>
       </InfoContainer>
     </Container>