Ver código fonte

Merge pull request #1432 from Gamaranto/remove-useless-elements

Remove Useless Elements
Bedeho Mender 4 anos atrás
pai
commit
bb2c371322

+ 0 - 12
packages/app/src/components/Hero.tsx

@@ -2,9 +2,7 @@ import React from 'react'
 import { fluidRange } from 'polished'
 import { css } from '@emotion/core'
 import { Button, Header } from '@/shared/components'
-import { navigate } from '@reach/router'
 import sizes from '@/shared/theme/sizes'
-import routes from '@/config/routes'
 
 type HeroProps = {
   backgroundImg: string
@@ -42,16 +40,6 @@ const Hero: React.FC<Partial<HeroProps>> = ({ backgroundImg }) => {
         >
           Play
         </Button>
-        <Button
-          variant="secondary"
-          containerCss={css`
-            width: 96px;
-          `}
-          // FIXME: remove after rebasing on navbar
-          onClick={() => navigate(routes.browse())}
-        >
-          Share
-        </Button>
       </div>
     </Header>
   )

+ 1 - 1
packages/app/src/components/Navbar/Navbar.tsx

@@ -37,7 +37,7 @@ const Navbar: React.FC<RouteComponentProps> = () => {
           <Link to="/">
             <StyledIcon name="home" />
           </Link>
-          <Link to="/discover">
+          <Link to={routes.browse()}>
             <StyledIcon name="binocular" />
           </Link>
         </NavigationContainer>

+ 0 - 4
packages/app/src/views/VideoView/VideoView.style.tsx

@@ -5,8 +5,6 @@ import theme from '@/shared/theme'
 export const Container = styled.div`
   display: flex;
   flex-direction: column;
-  // TODO: remove once we have the navbar
-  padding-top: 72px;
 `
 
 export const PlayerContainer = styled.div`
@@ -28,8 +26,6 @@ export const Title = styled.h2`
   margin: 0;
 `
 
-export const ActionsContainer = styled.div``
-
 export const Meta = styled.span`
   display: block;
   margin-top: ${theme.spacing.xxs};

+ 1 - 5
packages/app/src/views/VideoView/VideoView.tsx

@@ -1,7 +1,6 @@
 import React from 'react'
 import { RouteComponentProps, useParams } from '@reach/router'
 import {
-  ActionsContainer,
   Container,
   DescriptionContainer,
   InfoContainer,
@@ -14,7 +13,7 @@ import {
   TitleActionsContainer,
 } from './VideoView.style'
 import { VideoGrid } from '@/components'
-import { Button, VideoPlayer } from '@/shared/components'
+import { VideoPlayer } from '@/shared/components'
 import { formatDateAgo } from '@/utils/time'
 import { formatNumber } from '@/utils/number'
 import { useQuery } from '@apollo/client'
@@ -47,9 +46,6 @@ const VideoView: React.FC<RouteComponentProps> = () => {
       <InfoContainer>
         <TitleActionsContainer>
           <Title>{title}</Title>
-          <ActionsContainer>
-            <Button variant="secondary">Share</Button>
-          </ActionsContainer>
         </TitleActionsContainer>
         <Meta>
           {formatNumber(views)} views • {formatDateAgo(publishedOnJoystreamAt)}