Skip to content

Commit

Permalink
render filedrop for only authenticated users
Browse files Browse the repository at this point in the history
  • Loading branch information
btzr-io authored and jessopb committed Jul 16, 2021
1 parent 4d28c5d commit b40f68c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions static/app-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2044,5 +2044,7 @@
"The payment will be made from your saved card": "The payment will be made from your saved card",
"A channel is required to comment on lbry.tv": "A channel is required to comment on lbry.tv",
"Commenting...": "Commenting...",
"Reset": "Reset",
"Reset to original (previous) publish date": "Reset to original (previous) publish date",
"--end--": "--end--"
}
19 changes: 14 additions & 5 deletions ui/component/app/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,22 @@ import LANGUAGE_MIGRATIONS from 'constants/language-migrations';
const FileDrop = lazyImport(() => import('component/fileDrop' /* webpackChunkName: "secondary" */));
const ModalRouter = lazyImport(() => import('modal/modalRouter' /* webpackChunkName: "secondary" */));
const Nag = lazyImport(() => import('component/common/nag' /* webpackChunkName: "secondary" */));
const NagContinueFirstRun = lazyImport(() => import('component/nagContinueFirstRun' /* webpackChunkName: "secondary" */));
const NagContinueFirstRun = lazyImport(() =>
import('component/nagContinueFirstRun' /* webpackChunkName: "secondary" */)
);
const OpenInAppLink = lazyImport(() => import('web/component/openInAppLink' /* webpackChunkName: "secondary" */));

// @if TARGET='web'
const NagDataCollection = lazyImport(() => import('web/component/nag-data-collection' /* webpackChunkName: "secondary" */));
const NagDegradedPerformance = lazyImport(() => import('web/component/nag-degraded-performance' /* webpackChunkName: "secondary" */));
const NagDataCollection = lazyImport(() =>
import('web/component/nag-data-collection' /* webpackChunkName: "secondary" */)
);
const NagDegradedPerformance = lazyImport(() =>
import('web/component/nag-degraded-performance' /* webpackChunkName: "secondary" */)
);
const NagNoUser = lazyImport(() => import('web/component/nag-no-user' /* webpackChunkName: "nag-no-user" */));
const YoutubeWelcome = lazyImport(() => import('web/component/youtubeReferralWelcome' /* webpackChunkName: "secondary" */));
const YoutubeWelcome = lazyImport(() =>
import('web/component/youtubeReferralWelcome' /* webpackChunkName: "secondary" */)
);
// @endif

const SyncFatalError = lazyImport(() => import('component/syncFatalError' /* webpackChunkName: "syncFatalError" */));
Expand Down Expand Up @@ -168,6 +176,7 @@ function App(props: Props) {
const shouldMigrateLanguage = LANGUAGE_MIGRATIONS[language];
const hasActiveChannelClaim = activeChannelClaim !== undefined;
const isPersonalized = !IS_WEB || hasVerifiedEmail;
const renderFiledrop = !IS_WEB || isAuthenticated;

let uri;
try {
Expand Down Expand Up @@ -420,7 +429,7 @@ function App(props: Props) {
<Router />
<React.Suspense fallback={null}>
<ModalRouter />
<FileDrop />
{renderFiledrop && <FileDrop />}
</React.Suspense>
<FileRenderFloating />
<React.Suspense fallback={null}>
Expand Down

0 comments on commit b40f68c

Please sign in to comment.