mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-20 10:09:07 +00:00
Fix warnings and errors
This commit is contained in:
parent
e502b1502d
commit
e22bf38827
73 changed files with 3781 additions and 3812 deletions
|
@ -8,10 +8,10 @@ const config = {
|
|||
WEBPACK_WEB_PORT: process.env.WEBPACK_WEB_PORT,
|
||||
WEBPACK_ELECTRON_PORT: process.env.WEBPACK_ELECTRON_PORT,
|
||||
WEB_SERVER_PORT: process.env.WEB_SERVER_PORT,
|
||||
LBRY_WEB_API: process.env.LBRY_WEB_API, //api.na-backend.odysee.com',
|
||||
LBRY_WEB_API: process.env.LBRY_WEB_API, // api.na-backend.odysee.com',
|
||||
LBRY_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
|
||||
LBRY_API_URL: process.env.LBRY_API_URL, //api.lbry.com',
|
||||
LBRY_WEB_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, //player.odysee.com
|
||||
LBRY_API_URL: process.env.LBRY_API_URL, // api.lbry.com',
|
||||
LBRY_WEB_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, // player.odysee.com
|
||||
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
|
||||
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
|
||||
CLOUD_CONNECT_SITE_NAME: process.env.CLOUD_CONNECT_SITE_NAME,
|
||||
|
|
|
@ -57,7 +57,7 @@ mainInstance.waitUntilValid(() => {
|
|||
console.log(data.toString());
|
||||
});
|
||||
|
||||
process.on('SIGINT', function () {
|
||||
process.on('SIGINT', function() {
|
||||
console.log('Killing threads...');
|
||||
|
||||
child.kill('SIGINT');
|
||||
|
|
|
@ -37,7 +37,7 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
|||
}
|
||||
|
||||
if (response)
|
||||
return response.json().then(json => {
|
||||
{ return response.json().then(json => {
|
||||
let error;
|
||||
if (json.error) {
|
||||
error = new Error(json.error);
|
||||
|
@ -46,7 +46,7 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
|||
}
|
||||
error.response = response; // This is primarily a hack used in actions/user.js
|
||||
return Promise.reject(error);
|
||||
});
|
||||
}); }
|
||||
}
|
||||
|
||||
function makeRequest(url, options) {
|
||||
|
|
|
@ -54,7 +54,7 @@ const recsys = {
|
|||
* @param parentClaimId: string,
|
||||
* @param newClaimId: string,
|
||||
*/
|
||||
onClickedRecommended: function (parentClaimId, newClaimId) {
|
||||
onClickedRecommended: function(parentClaimId, newClaimId) {
|
||||
const parentEntry = recsys.entries[parentClaimId] ? recsys.entries[parentClaimId] : null;
|
||||
const parentUuid = parentEntry['uuid'];
|
||||
const parentRecommendedClaims = parentEntry['recClaimIds'] || [];
|
||||
|
@ -72,7 +72,7 @@ const recsys = {
|
|||
* Page was loaded. Get or Create entry and populate it with default data, plus recommended content, recsysId, etc.
|
||||
* Called from recommendedContent component
|
||||
*/
|
||||
onRecsLoaded: function (claimId, uris) {
|
||||
onRecsLoaded: function(claimId, uris) {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
if (!recsys.entries[claimId]) {
|
||||
|
@ -91,7 +91,7 @@ const recsys = {
|
|||
* @param: claimId: string
|
||||
* @param: parentUuid: string (optional)
|
||||
*/
|
||||
createRecsysEntry: function (claimId, parentUuid) {
|
||||
createRecsysEntry: function(claimId, parentUuid) {
|
||||
if (window.store && claimId) {
|
||||
const state = window.store.getState();
|
||||
const user = selectUser(state);
|
||||
|
@ -128,7 +128,7 @@ const recsys = {
|
|||
* @param claimId
|
||||
* @param isTentative
|
||||
*/
|
||||
sendRecsysEntry: function (claimId, isTentative) {
|
||||
sendRecsysEntry: function(claimId, isTentative) {
|
||||
const shareTelemetry =
|
||||
IS_WEB || (window && window.store && selectDaemonSettings(window.store.getState()).share_usage_data);
|
||||
|
||||
|
@ -151,7 +151,7 @@ const recsys = {
|
|||
* @param claimId
|
||||
* @param event
|
||||
*/
|
||||
onRecsysPlayerEvent: function (claimId, event, isEmbedded) {
|
||||
onRecsysPlayerEvent: function(claimId, event, isEmbedded) {
|
||||
if (!recsys.entries[claimId]) {
|
||||
recsys.createRecsysEntry(claimId);
|
||||
// do something to show it's floating or autoplay
|
||||
|
@ -162,7 +162,7 @@ const recsys = {
|
|||
recsys.entries[claimId].events.push(event);
|
||||
recsys.log('onRecsysPlayerEvent', claimId);
|
||||
},
|
||||
log: function (callName, claimId) {
|
||||
log: function(callName, claimId) {
|
||||
if (recsys.debug) {
|
||||
console.log(`Call: ***${callName}***, ClaimId: ${claimId}, Recsys Entries`, Object.assign({}, recsys.entries));
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ const recsys = {
|
|||
* Player closed. Check to see if primaryUri = playingUri
|
||||
* if so, send the Entry.
|
||||
*/
|
||||
onPlayerDispose: function (claimId, isEmbedded) {
|
||||
onPlayerDispose: function(claimId, isEmbedded) {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
const playingUri = selectPlayingUri(state);
|
||||
|
@ -221,7 +221,7 @@ const recsys = {
|
|||
* Navigate event
|
||||
* Send all claimIds that aren't currently playing.
|
||||
*/
|
||||
onNavigate: function () {
|
||||
onNavigate: function() {
|
||||
if (window.store) {
|
||||
const state = window.store.getState();
|
||||
const playingUri = selectPlayingUri(state);
|
||||
|
|
1
flow-typed/npm/async-exit-hook_vx.x.x.js
vendored
1
flow-typed/npm/async-exit-hook_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'async-exit-hook' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'async-exit-hook/index' {
|
||||
declare module.exports: $Exports<'async-exit-hook'>;
|
||||
|
|
2
flow-typed/npm/bluebird_v3.x.x.js
vendored
2
flow-typed/npm/bluebird_v3.x.x.js
vendored
|
@ -322,7 +322,7 @@ declare class Bluebird$Defer {
|
|||
reject: (value: any) => any;
|
||||
}
|
||||
|
||||
declare module "bluebird" {
|
||||
declare module 'bluebird' {
|
||||
declare module.exports: typeof Bluebird$Promise;
|
||||
|
||||
declare type Disposable<T> = Bluebird$Disposable<T>;
|
||||
|
|
2
flow-typed/npm/chalk_v2.x.x.js
vendored
2
flow-typed/npm/chalk_v2.x.x.js
vendored
|
@ -3,7 +3,7 @@
|
|||
|
||||
// From: https://github.com/chalk/chalk/blob/master/index.js.flow
|
||||
|
||||
declare module "chalk" {
|
||||
declare module 'chalk' {
|
||||
declare type TemplateStringsArray = $ReadOnlyArray<string>;
|
||||
|
||||
declare type Level = $Values<{
|
||||
|
|
6
flow-typed/npm/classnames_v2.x.x.js
vendored
6
flow-typed/npm/classnames_v2.x.x.js
vendored
|
@ -8,16 +8,16 @@ type $npm$classnames$Classes =
|
|||
| void
|
||||
| null;
|
||||
|
||||
declare module "classnames" {
|
||||
declare module 'classnames' {
|
||||
declare module.exports: (
|
||||
...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]>
|
||||
) => string;
|
||||
}
|
||||
|
||||
declare module "classnames/bind" {
|
||||
declare module 'classnames/bind' {
|
||||
declare module.exports: $Exports<"classnames">;
|
||||
}
|
||||
|
||||
declare module "classnames/dedupe" {
|
||||
declare module 'classnames/dedupe' {
|
||||
declare module.exports: $Exports<"classnames">;
|
||||
}
|
||||
|
|
1
flow-typed/npm/decompress_vx.x.x.js
vendored
1
flow-typed/npm/decompress_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'decompress' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'decompress/index' {
|
||||
declare module.exports: $Exports<'decompress'>;
|
||||
|
|
2
flow-typed/npm/del_v3.x.x.js
vendored
2
flow-typed/npm/del_v3.x.x.js
vendored
|
@ -37,7 +37,7 @@ type $npm$del$Options = {
|
|||
absolute?: boolean
|
||||
};
|
||||
|
||||
declare module "del" {
|
||||
declare module 'del' {
|
||||
declare class Del {
|
||||
(
|
||||
patterns: $npm$del$Patterns,
|
||||
|
|
1
flow-typed/npm/electron-dl_vx.x.x.js
vendored
1
flow-typed/npm/electron-dl_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'electron-dl' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'electron-dl/index' {
|
||||
declare module.exports: $Exports<'electron-dl'>;
|
||||
|
|
1
flow-typed/npm/electron-is-dev_vx.x.x.js
vendored
1
flow-typed/npm/electron-is-dev_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'electron-is-dev' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'electron-is-dev/index' {
|
||||
declare module.exports: $Exports<'electron-is-dev'>;
|
||||
|
|
|
@ -23,7 +23,6 @@ declare module 'electron-window-state' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'electron-window-state/index' {
|
||||
declare module.exports: $Exports<'electron-window-state'>;
|
||||
|
|
|
@ -23,7 +23,6 @@ declare module 'eslint-config-standard-jsx' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'eslint-config-standard-jsx/index' {
|
||||
declare module.exports: $Exports<'eslint-config-standard-jsx'>;
|
||||
|
|
|
@ -23,7 +23,6 @@ declare module 'eslint-config-standard' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'eslint-config-standard/index' {
|
||||
declare module.exports: $Exports<'eslint-config-standard'>;
|
||||
|
|
6
flow-typed/npm/express_v4.16.x.js
vendored
6
flow-typed/npm/express_v4.16.x.js
vendored
|
@ -1,8 +1,8 @@
|
|||
// flow-typed signature: 164dcf1c9105e51cb17a374a807146a7
|
||||
// flow-typed version: c7f4cf7a4d/express_v4.16.x/flow_>=v0.93.x
|
||||
|
||||
import * as http from "http";
|
||||
import type { Socket } from "net";
|
||||
import * as http from 'http';
|
||||
import type { Socket } from 'net';
|
||||
|
||||
declare type express$RouterOptions = {
|
||||
caseSensitive?: boolean,
|
||||
|
@ -284,7 +284,7 @@ declare type express$UrlEncodedOptions = {
|
|||
) => mixed,
|
||||
}
|
||||
|
||||
declare module "express" {
|
||||
declare module 'express' {
|
||||
declare export type RouterOptions = express$RouterOptions;
|
||||
declare export type CookieOptions = express$CookieOptions;
|
||||
declare export type Middleware = express$Middleware;
|
||||
|
|
2
flow-typed/npm/flow-bin_v0.x.x.js
vendored
2
flow-typed/npm/flow-bin_v0.x.x.js
vendored
|
@ -1,6 +1,6 @@
|
|||
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
|
||||
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
|
||||
|
||||
declare module "flow-bin" {
|
||||
declare module 'flow-bin' {
|
||||
declare module.exports: string;
|
||||
}
|
||||
|
|
1
flow-typed/npm/json-loader_vx.x.x.js
vendored
1
flow-typed/npm/json-loader_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'json-loader' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'json-loader/index' {
|
||||
declare module.exports: $Exports<'json-loader'>;
|
||||
|
|
1
flow-typed/npm/lbry-format_vx.x.x.js
vendored
1
flow-typed/npm/lbry-format_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'lbry-format' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'lbry-format/index' {
|
||||
declare module.exports: $Exports<'lbry-format'>;
|
||||
|
|
14
flow-typed/npm/mixpanel-browser_v2.11.x.js
vendored
14
flow-typed/npm/mixpanel-browser_v2.11.x.js
vendored
|
@ -3,11 +3,11 @@
|
|||
|
||||
declare module 'mixpanel-browser' {
|
||||
declare type People = {
|
||||
set(prop: Object|String, to?: any, callback?: Function): void;
|
||||
set_once(prop: Object|String, to?: any, callback?: Function): void;
|
||||
increment(prop: Object|string, by?: number, callback?: Function): void;
|
||||
append(prop: Object|string, value?: any, callback?: Function): void;
|
||||
union(prop: Object|string, value?: any, callback?: Function): void;
|
||||
set(prop: Object | String, to?: any, callback?: Function): void;
|
||||
set_once(prop: Object | String, to?: any, callback?: Function): void;
|
||||
increment(prop: Object | string, by?: number, callback?: Function): void;
|
||||
append(prop: Object | string, value?: any, callback?: Function): void;
|
||||
union(prop: Object | string, value?: any, callback?: Function): void;
|
||||
track_charge(amount: number, properties?: Object, callback?: Function): void;
|
||||
clear_charges(callback?: Function): void;
|
||||
delete_user(): void;
|
||||
|
@ -18,8 +18,8 @@ declare module 'mixpanel-browser' {
|
|||
push(item: [string, Object]): void;
|
||||
disable(events?: string[]): void;
|
||||
track(event_name: string, properties?: Object, callback?: Function): void;
|
||||
track_links(query: Object|string, event_name: string, properties?: Object|Function): void;
|
||||
track_forms(query: Object|string, event_name: string, properties?: Object|Function): void;
|
||||
track_links(query: Object | string, event_name: string, properties?: Object | Function): void;
|
||||
track_forms(query: Object | string, event_name: string, properties?: Object | Function): void;
|
||||
time_event(event_name: string): void;
|
||||
register(properties: Object, days?: number): void;
|
||||
register_once(properties: Object, default_value?: any, days?: number): void;
|
||||
|
|
11
flow-typed/npm/moment_v2.x.x.js
vendored
11
flow-typed/npm/moment_v2.x.x.js
vendored
|
@ -69,8 +69,7 @@ declare class moment$LocaleData {
|
|||
isPM(date: string): boolean;
|
||||
meridiem(hours: number, minutes: number, isLower: boolean): string;
|
||||
calendar(
|
||||
key:
|
||||
| "sameDay"
|
||||
key: | "sameDay"
|
||||
| "nextDay"
|
||||
| "lastDay"
|
||||
| "nextWeek"
|
||||
|
@ -123,8 +122,7 @@ declare class moment$Moment {
|
|||
static ISO_8601: string;
|
||||
static (string?: ?string): moment$Moment;
|
||||
static (
|
||||
initDate:
|
||||
| moment$MomentOptions
|
||||
initDate: | moment$MomentOptions
|
||||
| number
|
||||
| Date
|
||||
| Array<number>
|
||||
|
@ -157,8 +155,7 @@ declare class moment$Moment {
|
|||
static unix(seconds: number): moment$Moment;
|
||||
static utc(): moment$Moment;
|
||||
static utc(
|
||||
initDate:
|
||||
| moment$MomentOptions
|
||||
initDate: | moment$MomentOptions
|
||||
| number
|
||||
| Date
|
||||
| Array<number>
|
||||
|
@ -373,6 +370,6 @@ declare class moment$Moment {
|
|||
static invalid(object: any): moment$Moment;
|
||||
}
|
||||
|
||||
declare module "moment" {
|
||||
declare module 'moment' {
|
||||
declare module.exports: Class<moment$Moment>;
|
||||
}
|
||||
|
|
1
flow-typed/npm/node-loader_vx.x.x.js
vendored
1
flow-typed/npm/node-loader_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'node-loader' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'node-loader/index' {
|
||||
declare module.exports: $Exports<'node-loader'>;
|
||||
|
|
2
flow-typed/npm/prettier_v1.x.x.js
vendored
2
flow-typed/npm/prettier_v1.x.x.js
vendored
|
@ -1,7 +1,7 @@
|
|||
// flow-typed signature: 066c92e9ccb5f0711df8d73cbca837d6
|
||||
// flow-typed version: 9e32affdbd/prettier_v1.x.x/flow_>=v0.56.x
|
||||
|
||||
declare module "prettier" {
|
||||
declare module 'prettier' {
|
||||
declare export type AST = Object;
|
||||
declare export type Doc = Object;
|
||||
declare export type FastPath = Object;
|
||||
|
|
1
flow-typed/npm/raw-loader_vx.x.x.js
vendored
1
flow-typed/npm/raw-loader_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'raw-loader' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'raw-loader/index' {
|
||||
declare module.exports: $Exports<'raw-loader'>;
|
||||
|
|
4
flow-typed/npm/react-hot-loader_v4.6.x.js
vendored
4
flow-typed/npm/react-hot-loader_v4.6.x.js
vendored
|
@ -2,7 +2,7 @@
|
|||
// flow-typed version: 9d7a8571fd/react-hot-loader_v4.6.x/flow_>=v0.53.0
|
||||
|
||||
// @flow
|
||||
declare module "react-hot-loader" {
|
||||
declare module 'react-hot-loader' {
|
||||
declare type Module = {
|
||||
id: string,
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ declare module "react-hot-loader" {
|
|||
declare export function setConfig(config: $Shape<Config>): void
|
||||
}
|
||||
|
||||
declare module "react-hot-loader/root" {
|
||||
declare module 'react-hot-loader/root' {
|
||||
import type { ContainerProps } from 'react-hot-loader';
|
||||
|
||||
declare export function hot<T: React$ComponentType<any>>(
|
||||
|
|
2
flow-typed/npm/react-redux_v5.x.x.js
vendored
2
flow-typed/npm/react-redux_v5.x.x.js
vendored
|
@ -31,7 +31,7 @@ Decrypting the abbreviations:
|
|||
EFO = Extra factory options (used only in connectAdvanced)
|
||||
*/
|
||||
|
||||
declare module "react-redux" {
|
||||
declare module 'react-redux' {
|
||||
// ------------------------------------------------------------
|
||||
// Typings for connect()
|
||||
// ------------------------------------------------------------
|
||||
|
|
2
flow-typed/npm/react-toggle_v4.0.x.js
vendored
2
flow-typed/npm/react-toggle_v4.0.x.js
vendored
|
@ -1,7 +1,7 @@
|
|||
// flow-typed signature: 7d44bba9041ba487f4fa83ab9d1bd3c3
|
||||
// flow-typed version: 064c20def6/react-toggle_v4.0.x/flow_>=v0.54.x
|
||||
|
||||
declare module "react-toggle" {
|
||||
declare module 'react-toggle' {
|
||||
declare type Icons = {
|
||||
checked?: React$Node,
|
||||
unchecked?: React$Node
|
||||
|
|
1
flow-typed/npm/remark-react_vx.x.x.js
vendored
1
flow-typed/npm/remark-react_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'remark-react' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'remark-react/index' {
|
||||
declare module.exports: $Exports<'remark-react'>;
|
||||
|
|
1
flow-typed/npm/remark_vx.x.x.js
vendored
1
flow-typed/npm/remark_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'remark' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'remark/index' {
|
||||
declare module.exports: $Exports<'remark'>;
|
||||
|
|
1
flow-typed/npm/render-media_vx.x.x.js
vendored
1
flow-typed/npm/render-media_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'render-media' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'render-media/index' {
|
||||
declare module.exports: $Exports<'render-media'>;
|
||||
|
|
2
flow-typed/npm/reselect_v3.x.x.js
vendored
2
flow-typed/npm/reselect_v3.x.x.js
vendored
|
@ -3,7 +3,7 @@
|
|||
|
||||
type ExtractReturnType = <Return>((...rest: any[]) => Return) => Return;
|
||||
|
||||
declare module "reselect" {
|
||||
declare module 'reselect' {
|
||||
declare type InputSelector<-TState, TProps, TResult> =
|
||||
(state: TState, props: TProps, ...rest: any[]) => TResult
|
||||
|
||||
|
|
2
flow-typed/npm/semver_v5.1.x.js
vendored
2
flow-typed/npm/semver_v5.1.x.js
vendored
|
@ -1,7 +1,7 @@
|
|||
// flow-typed signature: dc381ee55406f66b7272c6343db0834b
|
||||
// flow-typed version: da30fe6876/semver_v5.1.x/flow_>=v0.25.x
|
||||
|
||||
declare module "semver" {
|
||||
declare module 'semver' {
|
||||
declare type Release =
|
||||
| "major"
|
||||
| "premajor"
|
||||
|
|
1
flow-typed/npm/stream-to-blob-url_vx.x.x.js
vendored
1
flow-typed/npm/stream-to-blob-url_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'stream-to-blob-url' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'stream-to-blob-url/index' {
|
||||
declare module.exports: $Exports<'stream-to-blob-url'>;
|
||||
|
|
45
flow-typed/npm/webpack_v4.x.x.js
vendored
45
flow-typed/npm/webpack_v4.x.x.js
vendored
|
@ -64,8 +64,7 @@ declare module 'webpack' {
|
|||
declare type ExternalItem =
|
||||
| string
|
||||
| {
|
||||
[k: string]:
|
||||
| string
|
||||
[k: string]: | string
|
||||
| {
|
||||
[k: string]: any,
|
||||
}
|
||||
|
@ -81,14 +80,12 @@ declare module 'webpack' {
|
|||
callback: (err?: Error, result?: string) => void
|
||||
) => void)
|
||||
| ExternalItem
|
||||
| Array<
|
||||
| ((
|
||||
| Array<| ((
|
||||
context: string,
|
||||
request: string,
|
||||
callback: (err?: Error, result?: string) => void
|
||||
) => void)
|
||||
| ExternalItem
|
||||
>;
|
||||
| ExternalItem>;
|
||||
|
||||
declare type RuleSetCondition =
|
||||
| RegExp
|
||||
|
@ -146,8 +143,7 @@ declare module 'webpack' {
|
|||
rules?: RuleSetRules,
|
||||
sideEffects?: boolean,
|
||||
test?: RuleSetConditionOrConditions,
|
||||
type?:
|
||||
| 'javascript/auto'
|
||||
type?: | 'javascript/auto'
|
||||
| 'javascript/dynamic'
|
||||
| 'javascript/esm'
|
||||
| 'json'
|
||||
|
@ -197,8 +193,7 @@ declare module 'webpack' {
|
|||
declare type OptimizationSplitChunksOptions = {
|
||||
automaticNameDelimiter?: string,
|
||||
cacheGroups?: {
|
||||
[k: string]:
|
||||
| false
|
||||
[k: string]: | false
|
||||
| Function
|
||||
| string
|
||||
| RegExp
|
||||
|
@ -255,8 +250,7 @@ declare module 'webpack' {
|
|||
providedExports?: boolean,
|
||||
removeAvailableModules?: boolean,
|
||||
removeEmptyChunks?: boolean,
|
||||
runtimeChunk?:
|
||||
| boolean
|
||||
runtimeChunk?: | boolean
|
||||
| ('single' | 'multiple')
|
||||
| {
|
||||
name?: string | Function,
|
||||
|
@ -273,8 +267,7 @@ declare module 'webpack' {
|
|||
};
|
||||
|
||||
declare type OutputOptions = {
|
||||
auxiliaryComment?:
|
||||
| string
|
||||
auxiliaryComment?: | string
|
||||
| {
|
||||
amd?: string,
|
||||
commonjs?: string,
|
||||
|
@ -302,8 +295,7 @@ declare module 'webpack' {
|
|||
jsonpScriptType?: false | 'text/javascript' | 'module',
|
||||
library?: string | Array<string> | LibraryCustomUmdObject,
|
||||
libraryExport?: string | ArrayOfStringValues,
|
||||
libraryTarget?:
|
||||
| 'var'
|
||||
libraryTarget?: | 'var'
|
||||
| 'assign'
|
||||
| 'this'
|
||||
| 'window'
|
||||
|
@ -337,8 +329,7 @@ declare module 'webpack' {
|
|||
declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>;
|
||||
|
||||
declare type ResolveOptions = {
|
||||
alias?:
|
||||
| { [k: string]: string }
|
||||
alias?: | { [k: string]: string }
|
||||
| Array<{
|
||||
alias?: string,
|
||||
name?: string,
|
||||
|
@ -384,8 +375,7 @@ declare module 'webpack' {
|
|||
chunkOrigins?: boolean,
|
||||
chunks?: boolean,
|
||||
chunksSort?: string,
|
||||
colors?:
|
||||
| boolean
|
||||
colors?: | boolean
|
||||
| {
|
||||
bold?: string,
|
||||
cyan?: string,
|
||||
|
@ -448,8 +438,7 @@ declare module 'webpack' {
|
|||
disableHostCheck?: boolean,
|
||||
filename?: string,
|
||||
headers?: { [key: string]: string },
|
||||
historyApiFallback?:
|
||||
| boolean
|
||||
historyApiFallback?: | boolean
|
||||
| {
|
||||
rewrites?: Array<{ from: string, to: string }>,
|
||||
disableDotRule?: boolean,
|
||||
|
@ -457,8 +446,7 @@ declare module 'webpack' {
|
|||
host?: string,
|
||||
hot?: boolean,
|
||||
hotOnly?: boolean,
|
||||
https?:
|
||||
| boolean
|
||||
https?: | boolean
|
||||
| {
|
||||
key: string,
|
||||
cert: string,
|
||||
|
@ -470,8 +458,7 @@ declare module 'webpack' {
|
|||
noInfo?: boolean,
|
||||
open?: boolean | string,
|
||||
openPage?: string,
|
||||
overlay?:
|
||||
| boolean
|
||||
overlay?: | boolean
|
||||
| {
|
||||
errors?: boolean,
|
||||
warnings?: boolean,
|
||||
|
@ -506,8 +493,7 @@ declare module 'webpack' {
|
|||
watchOptions?: WatchOptions,
|
||||
publicPath?: string,
|
||||
},
|
||||
devtool?:
|
||||
| '@cheap-eval-source-map'
|
||||
devtool?: | '@cheap-eval-source-map'
|
||||
| '@cheap-module-eval-source-map'
|
||||
| '@cheap-module-source-map'
|
||||
| '@cheap-source-map'
|
||||
|
@ -568,8 +554,7 @@ declare module 'webpack' {
|
|||
resolveLoader?: ResolveOptions,
|
||||
serve?: { [k: string]: any },
|
||||
stats?: StatsOptions,
|
||||
target?:
|
||||
| 'web'
|
||||
target?: | 'web'
|
||||
| 'webworker'
|
||||
| 'node'
|
||||
| 'async-node'
|
||||
|
|
1
flow-typed/npm/y18n_vx.x.x.js
vendored
1
flow-typed/npm/y18n_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'y18n' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'y18n/index' {
|
||||
declare module.exports: $Exports<'y18n'>;
|
||||
|
|
1
flow-typed/npm/yarnhook_vx.x.x.js
vendored
1
flow-typed/npm/yarnhook_vx.x.x.js
vendored
|
@ -23,7 +23,6 @@ declare module 'yarnhook' {
|
|||
* needed.
|
||||
*/
|
||||
|
||||
|
||||
// Filename aliases
|
||||
declare module 'yarnhook/index' {
|
||||
declare module.exports: $Exports<'yarnhook'>;
|
||||
|
|
2
flow-typed/reportContent.js
vendored
2
flow-typed/reportContent.js
vendored
|
@ -5,5 +5,3 @@ declare type ReportContentState = {
|
|||
isReporting: boolean,
|
||||
error: string,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -95,8 +95,8 @@ const YOUTUBER_CHANNEL_IDS = [
|
|||
channelLimit: 1,
|
||||
daysOfContent: 30,
|
||||
pageSize: 24,
|
||||
//pinnedUrls: [],
|
||||
//mixIn: [],
|
||||
// pinnedUrls: [],
|
||||
// mixIn: [],
|
||||
};
|
||||
|
||||
module.exports = { YOUTUBERS };
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
'postcss-import': {
|
||||
resolve: function (id) {
|
||||
resolve: function(id) {
|
||||
// Handle ~ imports for node_modules
|
||||
if (id.startsWith('~')) {
|
||||
try {
|
||||
|
@ -11,7 +11,7 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
},
|
||||
},
|
||||
cssnano: process.env.NODE_ENV === 'production' ? {} : false,
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -236,7 +236,15 @@ function App(props: Props) {
|
|||
fetchModBlockedList();
|
||||
fetchModAmIList();
|
||||
}
|
||||
}, [hasMyChannels, hasNoChannels, hasActiveChannelClaim, setActiveChannelIfNotSet, setIncognito]);
|
||||
}, [
|
||||
fetchModAmIList,
|
||||
fetchModBlockedList,
|
||||
hasMyChannels,
|
||||
hasNoChannels,
|
||||
hasActiveChannelClaim,
|
||||
setActiveChannelIfNotSet,
|
||||
setIncognito,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
// $FlowFixMe
|
||||
|
|
|
@ -102,7 +102,7 @@ function ChannelContent(props: Props) {
|
|||
}
|
||||
}, DEBOUNCE_WAIT_DURATION_MS);
|
||||
return () => clearTimeout(timer);
|
||||
}, [claimId, searchQuery, showMature]);
|
||||
}, [claimId, doResolveUris, searchQuery, showMature]);
|
||||
|
||||
React.useEffect(() => {
|
||||
setSearchQuery('');
|
||||
|
|
|
@ -121,7 +121,7 @@ function ChannelForm(props: Props) {
|
|||
bidError ||
|
||||
(isNewChannel && !params.name)
|
||||
);
|
||||
}, [isClaimingInitialRewards, creatingChannel, updatingChannel, nameError, bidError, isNewChannel, params.name]);
|
||||
}, [coverError, isClaimingInitialRewards, creatingChannel, updatingChannel, bidError, isNewChannel, params.name]);
|
||||
|
||||
function getChannelParams() {
|
||||
// fill this in with sdk data
|
||||
|
|
|
@ -385,7 +385,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
</NavLink>
|
||||
)}
|
||||
</div>
|
||||
<div className="claim-tile__info" uri={uri}>
|
||||
<div className="claim-tile__info">
|
||||
{!isChannelUri && signingChannel && (
|
||||
<div className="claim-preview__channel-staked">
|
||||
<UriIndicator focusable={false} uri={uri} link hideAnonymous>
|
||||
|
|
|
@ -260,7 +260,7 @@ function CollectionForm(props: Props) {
|
|||
const collectionClaimIds = JSON.parse(collectionClaimIdsString);
|
||||
setParams({ ...params, claims: collectionClaimIds });
|
||||
clearCollectionErrors();
|
||||
}, [collectionClaimIdsString, setParams]);
|
||||
}, [clearCollectionErrors, params, collectionClaimIdsString, setParams]);
|
||||
|
||||
React.useEffect(() => {
|
||||
let nameError;
|
||||
|
@ -302,14 +302,14 @@ function CollectionForm(props: Props) {
|
|||
setParam({ channel_id: undefined });
|
||||
}
|
||||
}
|
||||
}, [activeChannelId, incognito, initialized]);
|
||||
}, [setParam, activeChannelId, incognito, initialized]);
|
||||
|
||||
// setup initial params after we're sure if it's published or not
|
||||
React.useEffect(() => {
|
||||
if (!uri || (uri && hasClaim)) {
|
||||
updateParams(getCollectionParams());
|
||||
}
|
||||
}, [uri, hasClaim]);
|
||||
}, [uri, hasClaim, getCollectionParams, updateParams]);
|
||||
|
||||
React.useEffect(() => {
|
||||
resetThumbnailStatus();
|
||||
|
|
|
@ -58,7 +58,7 @@ function FileList(props: Props) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}, [radio, onChange]);
|
||||
}, [radio, onChange, getFile]);
|
||||
|
||||
return (
|
||||
<div className={'file-list'}>
|
||||
|
|
|
@ -23,7 +23,7 @@ function LoginGraphic(props: any) {
|
|||
} else {
|
||||
setSrc(imgUrl);
|
||||
}
|
||||
}, []);
|
||||
}, [imgUrl]);
|
||||
|
||||
if (error || !imgUrl) {
|
||||
return null;
|
||||
|
|
|
@ -120,7 +120,7 @@ function PublishFile(props: Props) {
|
|||
processSelectedFile(fileData);
|
||||
}
|
||||
readSelectedFileDetails();
|
||||
}, [filePath]);
|
||||
}, [filePath, processSelectedFile]);
|
||||
|
||||
useEffect(() => {
|
||||
const isOptimizeAvail = currentFile && currentFile !== '' && isVid && ffmpegAvail;
|
||||
|
|
|
@ -262,7 +262,7 @@ function PublishForm(props: Props) {
|
|||
if (publishing || publishSuccess) {
|
||||
clearPublish();
|
||||
}
|
||||
}, [clearPublish]);
|
||||
}, [clearPublish, publishing, publishSuccess]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!thumbnail) {
|
||||
|
@ -363,7 +363,7 @@ function PublishForm(props: Props) {
|
|||
const newParams = new URLSearchParams();
|
||||
newParams.set(TYPE_PARAM, mode.toLowerCase());
|
||||
replace({ search: newParams.toString() });
|
||||
}, [mode, _uploadType]);
|
||||
}, [mode, _uploadType, replace]);
|
||||
|
||||
// @if TARGET='app'
|
||||
// Save file changes locally ( desktop )
|
||||
|
|
|
@ -87,7 +87,7 @@ export default function ReportContent(props: Props) {
|
|||
claim_ids: [claimId],
|
||||
});
|
||||
}
|
||||
}, [claim, claimId]);
|
||||
}, [claim, claimId, doClaimSearch]);
|
||||
|
||||
// On mount, pause player and get the timestamp, if applicable.
|
||||
React.useEffect(() => {
|
||||
|
@ -102,7 +102,7 @@ export default function ReportContent(props: Props) {
|
|||
const str = (n) => n.toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false });
|
||||
updateInput('timestamp', str(h) + ':' + str(m) + ':' + str(s));
|
||||
}
|
||||
}, []);
|
||||
}, [updateInput]);
|
||||
|
||||
React.useEffect(() => {
|
||||
let timer;
|
||||
|
|
|
@ -196,7 +196,7 @@ function RepostCreate(props: Props) {
|
|||
if (repostTakeoverAmount) {
|
||||
setAutoRepostBid(repostTakeoverAmount);
|
||||
}
|
||||
}, [enteredRepostAmount, passedRepostAmount]);
|
||||
}, [setAutoRepostBid, enteredRepostAmount, passedRepostAmount]);
|
||||
|
||||
// repost bid error
|
||||
React.useEffect(() => {
|
||||
|
@ -211,7 +211,7 @@ function RepostCreate(props: Props) {
|
|||
rBidError = __('Your deposit must be higher');
|
||||
}
|
||||
setRepostBidError(rBidError);
|
||||
}, [setRepostBidError, repostBidError, repostBid]);
|
||||
}, [balance, setRepostBidError, repostBidError, repostBid]);
|
||||
|
||||
// setContentUri given enteredUri
|
||||
React.useEffect(() => {
|
||||
|
|
|
@ -67,7 +67,7 @@ const SearchOptions = (props: Props) => {
|
|||
if (options[SEARCH_OPTIONS.RESULT_COUNT] !== SEARCH_PAGE_SIZE) {
|
||||
setSearchOption(SEARCH_OPTIONS.RESULT_COUNT, SEARCH_PAGE_SIZE);
|
||||
}
|
||||
}, []);
|
||||
}, [options, setSearchOption]);
|
||||
|
||||
function updateSearchOptions(option, value) {
|
||||
setSearchOption(option, value);
|
||||
|
|
|
@ -34,7 +34,7 @@ export default function SettingStorage(props: Props) {
|
|||
cleanBlobs().then(() => {
|
||||
setCleaning(false);
|
||||
});
|
||||
}, []);
|
||||
}, [cleanBlobs]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -105,7 +105,7 @@ function SettingViewHosting(props: Props) {
|
|||
if (unlimited && viewHostingLimit !== 0) {
|
||||
handleApply();
|
||||
}
|
||||
}, [unlimited, viewHostingLimit]);
|
||||
}, [handleApply, unlimited, viewHostingLimit]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -73,27 +73,27 @@ function SettingWalletServer(props: Props) {
|
|||
doClear();
|
||||
}
|
||||
},
|
||||
[]
|
||||
[doClear]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (hasWalletServerPrefs) {
|
||||
setUsingCustomServer(true);
|
||||
}
|
||||
}, []);
|
||||
}, [hasWalletServerPrefs]);
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
getDaemonStatus();
|
||||
}, STATUS_INTERVAL);
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
}, [getDaemonStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
if (walletRollbackToDefault) {
|
||||
doClear();
|
||||
}
|
||||
}, [walletRollbackToDefault]);
|
||||
}, [doClear, walletRollbackToDefault]);
|
||||
|
||||
useEffect(() => {
|
||||
if (usingCustomServer) {
|
||||
|
|
|
@ -89,7 +89,14 @@ const SupportsLiquidate = (props: Props) => {
|
|||
}
|
||||
setUnlockTextAmount(String(defaultValue));
|
||||
setDefaultValueAssigned(true);
|
||||
}, [defaultValueAssigned, previewBalance, unlockTextAmount, setUnlockTextAmount, setDefaultValueAssigned]);
|
||||
}, [
|
||||
defaultValue,
|
||||
defaultValueAssigned,
|
||||
previewBalance,
|
||||
unlockTextAmount,
|
||||
setUnlockTextAmount,
|
||||
setDefaultValueAssigned,
|
||||
]);
|
||||
|
||||
// Update message & error based on unlock amount.
|
||||
useEffect(() => {
|
||||
|
@ -117,7 +124,7 @@ const SupportsLiquidate = (props: Props) => {
|
|||
setMessage(initialMessage);
|
||||
setError(false);
|
||||
}
|
||||
}, [unlockTextAmount, previewBalance, setMessage, setError]);
|
||||
}, [initialMessage, unlockTextAmount, previewBalance, setMessage, setError]);
|
||||
|
||||
return (
|
||||
<Card
|
||||
|
|
|
@ -34,16 +34,8 @@ const SHARED_KEY = 'shared';
|
|||
const LOCAL_KEY = 'local';
|
||||
|
||||
function SyncEnableFlow(props: Props) {
|
||||
const {
|
||||
setSyncEnabled,
|
||||
getSyncError,
|
||||
getSyncPending,
|
||||
getSync,
|
||||
checkSync,
|
||||
mode,
|
||||
closeModal,
|
||||
updatePreferences,
|
||||
} = props;
|
||||
const { setSyncEnabled, getSyncError, getSyncPending, getSync, checkSync, mode, closeModal, updatePreferences } =
|
||||
props;
|
||||
|
||||
const [step, setStep] = React.useState(INITIAL);
|
||||
const [prefDict, setPrefDict]: [any, (any) => void] = React.useState();
|
||||
|
@ -118,7 +110,7 @@ function SyncEnableFlow(props: Props) {
|
|||
setStep(FETCH_FOR_DISABLE);
|
||||
}
|
||||
}
|
||||
}, [mode, setPassword]);
|
||||
}, [mode, setPassword, checkSync]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (step === FETCH_FOR_ENABLE) {
|
||||
|
@ -146,7 +138,7 @@ function SyncEnableFlow(props: Props) {
|
|||
setStep(CONFIRM);
|
||||
});
|
||||
}
|
||||
}, [step, setPrefDict, setStep, password]);
|
||||
}, [step, setPrefDict, setStep, password, getSync]);
|
||||
|
||||
if (getSyncPending) {
|
||||
return (
|
||||
|
|
|
@ -15,7 +15,7 @@ export default function TextareaSuggestionsItem(props: Props) {
|
|||
const { name: value, url, unicode } = emote;
|
||||
|
||||
return (
|
||||
<div {...autocompleteProps} dispatch={undefined}>
|
||||
<div {...autocompleteProps}>
|
||||
{unicode ? <div className="emote">{unicode}</div> : <img className="emote" src={url} />}
|
||||
|
||||
<div className="textareaSuggestion__label">
|
||||
|
@ -31,7 +31,7 @@ export default function TextareaSuggestionsItem(props: Props) {
|
|||
const value = claim.canonical_url.replace('lbry://', '').replace('#', ':');
|
||||
|
||||
return (
|
||||
<div {...autocompleteProps} dispatch={undefined}>
|
||||
<div {...autocompleteProps}>
|
||||
<ChannelThumbnail xsmall uri={uri} />
|
||||
|
||||
<div className="textareaSuggestion__label">
|
||||
|
|
|
@ -56,7 +56,7 @@ function UserChannelFollowIntro(props: Props) {
|
|||
};
|
||||
setTimeout(delayedChannelSubscribe, 1000);
|
||||
}
|
||||
}, [prefsReady]);
|
||||
}, [prefsReady, channelSubscribe]);
|
||||
|
||||
return (
|
||||
<Card
|
||||
|
|
|
@ -87,7 +87,7 @@ function UserEmailNew(props: Props) {
|
|||
if (emailExists) {
|
||||
handleChangeToSignIn();
|
||||
}
|
||||
}, [emailExists]);
|
||||
}, [emailExists, handleChangeToSignIn]);
|
||||
|
||||
return (
|
||||
<div className={classnames('main__sign-up')}>
|
||||
|
|
|
@ -7,10 +7,10 @@ import Spinner from 'component/spinner';
|
|||
|
||||
type Props = {
|
||||
user: ?User,
|
||||
history: { push: string => void, replace: string => void },
|
||||
history: { push: (string) => void, replace: (string) => void },
|
||||
location: { search: string },
|
||||
userFetchPending: boolean,
|
||||
doUserSignIn: string => void,
|
||||
doUserSignIn: (string) => void,
|
||||
emailToVerify: ?string,
|
||||
passwordExists: boolean,
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ function UserSignIn(props: Props) {
|
|||
if (hasVerifiedEmail || (!showEmail && !showPassword && !showLoading)) {
|
||||
history.replace(redirect || '/');
|
||||
}
|
||||
}, [showEmail, showPassword, showLoading, hasVerifiedEmail]);
|
||||
}, [showEmail, showPassword, showLoading, hasVerifiedEmail, history, redirect]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (emailToVerify && emailOnlyLogin) {
|
||||
|
|
|
@ -110,7 +110,7 @@ function UserSignUp(props: Props) {
|
|||
if (previousHasVerifiedEmail === false && hasVerifiedEmail && prefsReady) {
|
||||
setSettingAndSync(SETTINGS.FIRST_RUN_STARTED, true);
|
||||
}
|
||||
}, [hasVerifiedEmail, previousHasVerifiedEmail, prefsReady]);
|
||||
}, [hasVerifiedEmail, previousHasVerifiedEmail, prefsReady, setSettingAndSync]);
|
||||
|
||||
React.useEffect(() => {
|
||||
// Don't claim the reward if sync is enabled until after a sync has been completed successfully
|
||||
|
|
|
@ -157,7 +157,7 @@ const VideoJsEvents = ({
|
|||
.getChild('TheaterModeButton')
|
||||
.controlText(videoTheaterMode ? __('Default Mode (t)') : __('Theater Mode (t)'));
|
||||
}
|
||||
}, [videoTheaterMode]);
|
||||
}, [videoTheaterMode, playerRef]);
|
||||
|
||||
// when user clicks 'Unmute' button, turn audio on and hide unmute button
|
||||
function unmuteAndHideHint() {
|
||||
|
@ -224,14 +224,14 @@ const VideoJsEvents = ({
|
|||
autoplayButton.setAttribute('aria-checked', autoplaySetting);
|
||||
}
|
||||
}
|
||||
}, [autoplaySetting]);
|
||||
}, [autoplaySetting, playerRef]);
|
||||
|
||||
useEffect(() => {
|
||||
const player = playerRef.current;
|
||||
if (replay && player) {
|
||||
player.play();
|
||||
}
|
||||
}, [replay]);
|
||||
}, [replay, playerRef]);
|
||||
|
||||
function initializeEvents() {
|
||||
const player = playerRef.current;
|
||||
|
|
|
@ -245,7 +245,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
window.player = undefined;
|
||||
}
|
||||
};
|
||||
}, [isAudio, source]);
|
||||
}, [isAudio, source, curried_function, createVideoPlayerDOM, detectFileType, initializeVideoPlayer]);
|
||||
|
||||
// Update video player and reload when source URL changes
|
||||
useEffect(() => {
|
||||
|
@ -279,7 +279,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
player.bigPlayButton.hide();
|
||||
}
|
||||
});
|
||||
}, [source, reload]);
|
||||
}, [source, reload, sourceType, videoJsOptions.sources]);
|
||||
|
||||
return (
|
||||
// $FlowFixMe
|
||||
|
|
|
@ -24,5 +24,5 @@ export default function useHistoryNav(history) {
|
|||
window.addEventListener('keydown', handleKeyPress);
|
||||
}
|
||||
return () => window.removeEventListener('keydown', handleKeyPress);
|
||||
}, [el]);
|
||||
}, [el, history]);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ export default function useLazyLoading(
|
|||
|
||||
// $FlowFixMe
|
||||
lazyLoadingObserver.observe(elementRef.current);
|
||||
}, deps);
|
||||
}, [backgroundFallback, elementRef, yOffsetPx]);
|
||||
|
||||
return srcLoaded;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ function ModalAffirmPurchase(props: Props) {
|
|||
clearTimeout(timeout);
|
||||
}
|
||||
};
|
||||
}, [success, uri]);
|
||||
}, [success, uri, closeModal]);
|
||||
|
||||
return (
|
||||
<Modal type="card" isOpen contentLabel={modalTitle} onAborted={cancelPurchase}>
|
||||
|
|
|
@ -92,11 +92,11 @@ function FileListPublished(props: Props) {
|
|||
params.set('searchText', searchText);
|
||||
history.replace('?' + params.toString());
|
||||
debounceFilter();
|
||||
}, [myClaims, searchText]);
|
||||
}, [myClaims, searchText, debounceFilter, history, search]);
|
||||
|
||||
useEffect(() => {
|
||||
doFilterClaims();
|
||||
}, [myClaims, filterBy]);
|
||||
}, [myClaims, filterBy, doFilterClaims]);
|
||||
|
||||
const urlTotal = filteredClaims.length;
|
||||
|
||||
|
@ -118,7 +118,7 @@ function FileListPublished(props: Props) {
|
|||
const params = new URLSearchParams(search);
|
||||
params.set(PAGINATE_PARAM, '1');
|
||||
history.replace('?' + params.toString());
|
||||
}, [filteredClaims]);
|
||||
}, [filteredClaims, history, search]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchAllMyClaims();
|
||||
|
|
|
@ -77,7 +77,7 @@ export default function NotificationsPage(props: Props) {
|
|||
// If there are unread notifications when entering the page, reset to All.
|
||||
setName(NOTIFICATIONS.NOTIFICATION_NAME_ALL);
|
||||
}
|
||||
}, []);
|
||||
}, [setName, unreadCount, unseenCount]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (unseenCount > 0) {
|
||||
|
@ -104,7 +104,7 @@ export default function NotificationsPage(props: Props) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}, [name, notifications, stringifiedNotificationCategories]);
|
||||
}, [name, notifications, stringifiedNotificationCategories, doNotificationList]);
|
||||
|
||||
const notificationListElement = (
|
||||
<>
|
||||
|
|
|
@ -53,7 +53,7 @@ export default function NotificationSettingsPage(props: Props) {
|
|||
setError(true);
|
||||
});
|
||||
}
|
||||
}, [isAuthenticated]);
|
||||
}, [lbryIoParams, isAuthenticated]);
|
||||
|
||||
function handleChangeTag(name, newIsEnabled) {
|
||||
const tagParams = newIsEnabled ? { add: name } : { remove: name };
|
||||
|
|
|
@ -39,13 +39,13 @@ function SignInVerifyPage(props: Props) {
|
|||
if (!authToken || !userSubmittedEmail || !verificationToken) {
|
||||
onAuthError(__('Invalid or expired sign-in link.'));
|
||||
}
|
||||
}, [authToken, userSubmittedEmail, verificationToken, doToast, push]);
|
||||
}, [onAuthError, authToken, userSubmittedEmail, verificationToken, doToast, push]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!needsRecaptcha) {
|
||||
verifyUser();
|
||||
}
|
||||
}, [needsRecaptcha]);
|
||||
}, [verifyUser, needsRecaptcha]);
|
||||
|
||||
React.useEffect(() => {
|
||||
let captchaTimeout;
|
||||
|
|
|
@ -46,7 +46,7 @@ let baseConfig = {
|
|||
loader: 'postcss-loader',
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: function () {
|
||||
plugins: function() {
|
||||
return [require('postcss-rtl')()];
|
||||
},
|
||||
},
|
||||
|
@ -102,7 +102,7 @@ let baseConfig = {
|
|||
plugins: [
|
||||
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }),
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development' // default value if NODE_ENV is not defined
|
||||
NODE_ENV: 'development', // default value if NODE_ENV is not defined
|
||||
}),
|
||||
new DefinePlugin({
|
||||
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
|
||||
|
|
Loading…
Add table
Reference in a new issue