Procházet zdrojové kódy

Remove channels from navigation

WRadoslaw před 1 rokem
rodič
revize
3b731d3e12

+ 2 - 1
packages/atlas/src/components/_channel/ChannelsSection/ChannelsSection.tsx

@@ -50,7 +50,8 @@ export const ChannelsSection = () => {
         children: channels.map(({ node }) => <ChannelCard key={node.id} channel={node} />),
       }}
       footerProps={{
-        type: 'infinite',
+        type: 'load',
+        label: 'Load more channels',
         reachedEnd: !pageInfo?.hasNextPage ?? true,
         fetchMore: async () => {
           setIsLoading(true)

+ 0 - 7
packages/atlas/src/components/_navigation/SidenavViewer/SidenavViewer.tsx

@@ -3,7 +3,6 @@ import { FC, useState } from 'react'
 import {
   SvgActionMember,
   SvgActionNewTab,
-  SvgSidebarChannels,
   SvgSidebarExplore,
   SvgSidebarHome,
   SvgSidebarMarketplace,
@@ -57,12 +56,6 @@ export const viewerNavItems = [
     to: absoluteRoutes.viewer.discover(),
     bottomNav: false,
   },
-  {
-    icon: <SvgSidebarChannels />,
-    name: 'Channels',
-    to: absoluteRoutes.viewer.channels(),
-    bottomNav: true,
-  },
   ...(atlasConfig.features.ypp.googleConsoleClientId
     ? [
         {

+ 2 - 0
packages/atlas/src/views/viewer/ChannelsView/ChannelsView.tsx

@@ -2,6 +2,7 @@ import { FC } from 'react'
 
 import { useTop10Channels } from '@/api/hooks/channel'
 import { ChannelGallery } from '@/components/_channel/ChannelGallery'
+import { ChannelsSection } from '@/components/_channel/ChannelsSection'
 import { ExpandableChannelsList } from '@/components/_channel/ExpandableChannelsList'
 import { DiscoverChannels } from '@/components/_content/DiscoverChannels'
 import { VideoContentTemplate } from '@/components/_templates/VideoContentTemplate'
@@ -22,6 +23,7 @@ export const ChannelsView: FC = () => {
         {!error ? <ChannelGallery hasRanking channels={channels} loading={loading} title="Top 10 channels" /> : null}
         <DiscoverChannels />
         <ExpandableChannelsList queryType="regular" title="Channels in your language" languageSelector />
+        <ChannelsSection />
       </VideoContentTemplate>
     </>
   )