setSidebarOpen(false)} />
+ >
+ )}
);
}
-export default withRouter(SideNavigation);
+export default SideNavigation;
diff --git a/ui/component/socialShare/view.jsx b/ui/component/socialShare/view.jsx
index 073b0f524..0e26b9a1e 100644
--- a/ui/component/socialShare/view.jsx
+++ b/ui/component/socialShare/view.jsx
@@ -5,7 +5,7 @@ import Button from 'component/button';
import CopyableText from 'component/copyableText';
import EmbedTextArea from 'component/embedTextArea';
import { generateDownloadUrl } from 'util/web';
-import useIsMobile from 'effects/use-is-mobile';
+import { useIsMobile } from 'effects/use-screensize';
import { FormField } from 'component/common/form';
import { hmsToSeconds, secondsToHms } from 'util/time';
import {
diff --git a/ui/component/subscribeButton/view.jsx b/ui/component/subscribeButton/view.jsx
index aefa6693e..207d4deb9 100644
--- a/ui/component/subscribeButton/view.jsx
+++ b/ui/component/subscribeButton/view.jsx
@@ -5,7 +5,7 @@ import React, { useRef } from 'react';
import { parseURI } from 'lbry-redux';
import Button from 'component/button';
import useHover from 'effects/use-hover';
-import useIsMobile from 'effects/use-is-mobile';
+import { useIsMobile } from 'effects/use-screensize';
type SubscriptionArgs = {
channelName: string,
diff --git a/ui/constants/modal_types.js b/ui/constants/modal_types.js
index 71852a0b4..eea7e63e6 100644
--- a/ui/constants/modal_types.js
+++ b/ui/constants/modal_types.js
@@ -34,7 +34,6 @@ export const WALLET_SEND = 'wallet_send';
export const WALLET_RECEIVE = 'wallet_receive';
export const CREATE_CHANNEL = 'create_channel';
export const YOUTUBE_WELCOME = 'youtube_welcome';
-export const MOBILE_NAVIGATION = 'mobile_navigation';
export const SET_REFERRER = 'set_referrer';
export const REPOST = 'repost';
export const SIGN_OUT = 'sign_out';
diff --git a/ui/effects/use-is-mobile.js b/ui/effects/use-is-mobile.js
deleted file mode 100644
index 9ab04c35c..000000000
--- a/ui/effects/use-is-mobile.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import useMedia from './use-media';
-
-export default function useIsMobile() {
- const isMobile = useMedia(['(min-width: 901px)'], [false], true);
- return isMobile;
-}
diff --git a/ui/effects/use-screensize.js b/ui/effects/use-screensize.js
new file mode 100644
index 000000000..badba5b03
--- /dev/null
+++ b/ui/effects/use-screensize.js
@@ -0,0 +1,11 @@
+import useMedia from './use-media';
+
+export function useIsMobile() {
+ const isMobile = useMedia(['(min-width: 901px)'], [false], true);
+ return isMobile;
+}
+
+export function useIsMediumScreen() {
+ const isMobile = useMedia(['(min-width: 1151px)'], [false], true);
+ return isMobile;
+}
diff --git a/ui/modal/modal.jsx b/ui/modal/modal.jsx
index 32a018cd9..de99d2b67 100644
--- a/ui/modal/modal.jsx
+++ b/ui/modal/modal.jsx
@@ -5,7 +5,7 @@ import * as React from 'react';
import ReactModal from 'react-modal';
import Button from 'component/button';
import classnames from 'classnames';
-import useIsMobile from 'effects/use-is-mobile';
+import { useIsMobile } from 'effects/use-screensize';
type ModalProps = {
type?: string,
diff --git a/ui/modal/modalMobileNavigation/index.js b/ui/modal/modalMobileNavigation/index.js
deleted file mode 100644
index 4de842cd7..000000000
--- a/ui/modal/modalMobileNavigation/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { connect } from 'react-redux';
-import { doHideModal, doSignOut } from 'redux/actions/app';
-import ModalMobileNavigation from './view';
-
-export default connect(
- null,
- {
- doHideModal,
- doSignOut,
- }
-)(ModalMobileNavigation);
diff --git a/ui/modal/modalMobileNavigation/view.jsx b/ui/modal/modalMobileNavigation/view.jsx
deleted file mode 100644
index 015f96511..000000000
--- a/ui/modal/modalMobileNavigation/view.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-// @flow
-import React from 'react';
-import { Modal } from 'modal/modal';
-import SideNavigation from 'component/sideNavigation';
-
-type Props = {
- doHideModal: () => void,
-};
-
-export default function ModalMobileNavigation(props: Props) {
- const { doHideModal } = props;
-
- return (
-
-
-
- );
-}
diff --git a/ui/modal/modalRouter/view.jsx b/ui/modal/modalRouter/view.jsx
index 54535003f..5c8bd34c0 100644
--- a/ui/modal/modalRouter/view.jsx
+++ b/ui/modal/modalRouter/view.jsx
@@ -32,7 +32,6 @@ import ModalWalletSend from 'modal/modalWalletSend';
import ModalWalletReceive from 'modal/modalWalletReceive';
import ModalYoutubeWelcome from 'modal/modalYoutubeWelcome';
import ModalCreateChannel from 'modal/modalChannelCreate';
-import ModalMobileNavigation from 'modal/modalMobileNavigation';
import ModalSetReferrer from 'modal/modalSetReferrer';
import ModalRepost from 'modal/modalRepost';
import ModalSignOut from 'modal/modalSignOut';
@@ -125,8 +124,6 @@ function ModalRouter(props: Props) {
return
;
case MODALS.CREATE_CHANNEL:
return
;
- case MODALS.MOBILE_NAVIGATION:
- return
;
case MODALS.SET_REFERRER:
return
;
case MODALS.REPOST:
diff --git a/ui/page/discover/view.jsx b/ui/page/discover/view.jsx
index f10381894..c608a02c9 100644
--- a/ui/page/discover/view.jsx
+++ b/ui/page/discover/view.jsx
@@ -6,7 +6,7 @@ import Page from 'component/page';
import ClaimListDiscover from 'component/claimListDiscover';
import Button from 'component/button';
import useHover from 'effects/use-hover';
-import useIsMobile from 'effects/use-is-mobile';
+import { useIsMobile } from 'effects/use-screensize';
import analytics from 'analytics';
import HiddenNsfw from 'component/common/hidden-nsfw';
import Icon from 'component/common/icon';
diff --git a/ui/page/file/index.js b/ui/page/file/index.js
index 8fa3ef7ba..7d9eb2243 100644
--- a/ui/page/file/index.js
+++ b/ui/page/file/index.js
@@ -4,7 +4,6 @@ import { doSetContentHistoryItem } from 'redux/actions/content';
import {
doFetchFileInfo,
makeSelectFileInfoForUri,
- makeSelectClaimForUri,
makeSelectMetadataForUri,
makeSelectChannelForClaimUri,
makeSelectClaimIsNsfw,
@@ -16,7 +15,6 @@ import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
import FilePage from './view';
const select = (state, props) => ({
- claim: makeSelectClaimForUri(props.uri)(state),
costInfo: makeSelectCostInfoForUri(props.uri)(state),
metadata: makeSelectMetadataForUri(props.uri)(state),
obscureNsfw: !selectShowMatureContent(state),
diff --git a/ui/page/file/view.jsx b/ui/page/file/view.jsx
index 2de8cd13e..afcef4a03 100644
--- a/ui/page/file/view.jsx
+++ b/ui/page/file/view.jsx
@@ -15,12 +15,10 @@ import WaitUntilOnPage from 'component/common/wait-until-on-page';
import RecommendedContent from 'component/recommendedContent';
import CommentsList from 'component/commentsList';
import CommentCreate from 'component/commentCreate';
-import YoutubeBadge from 'component/youtubeBadge';
export const FILE_WRAPPER_CLASS = 'file-page__video-container';
type Props = {
- claim: StreamClaim,
costInfo: ?{ includesData: boolean, cost: number },
fileInfo: FileListItem,
uri: string,
@@ -86,13 +84,9 @@ class FilePage extends React.Component
{
}
renderFilePageLayout(uri: string, mode: string, cost: ?number) {
- const { claim } = this.props;
- const channelClaimId = claim.signing_channel ? claim.signing_channel.claim_id : null;
-
if (RENDER_MODES.FLOATING_MODES.includes(mode)) {
return (
-
@@ -105,7 +99,6 @@ class FilePage extends React.Component {
if (RENDER_MODES.UNRENDERABLE_MODES.includes(mode)) {
return (
-
@@ -115,7 +108,6 @@ class FilePage extends React.Component {
if (RENDER_MODES.TEXT_MODES.includes(mode)) {
return (
-
@@ -125,7 +117,6 @@ class FilePage extends React.Component {
return (
-
@@ -152,29 +143,26 @@ class FilePage extends React.Component {
}
return (
-
+
{this.renderFilePageLayout(uri, renderMode, costInfo ? costInfo.cost : null)}
+
+
+
+
+
+
+
+
+
+ }
+ />
-