Fix warnings and errors

This commit is contained in:
Ben van Hartingsveldt 2025-09-16 13:42:47 +02:00
parent e502b1502d
commit e22bf38827
No known key found for this signature in database
GPG key ID: 261AA214130CE7AB
73 changed files with 3781 additions and 3812 deletions

View file

@ -8,10 +8,10 @@ const config = {
WEBPACK_WEB_PORT: process.env.WEBPACK_WEB_PORT, WEBPACK_WEB_PORT: process.env.WEBPACK_WEB_PORT,
WEBPACK_ELECTRON_PORT: process.env.WEBPACK_ELECTRON_PORT, WEBPACK_ELECTRON_PORT: process.env.WEBPACK_ELECTRON_PORT,
WEB_SERVER_PORT: process.env.WEB_SERVER_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_WEB_PUBLISH_API: process.env.LBRY_WEB_PUBLISH_API,
LBRY_API_URL: process.env.LBRY_API_URL, //api.lbry.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_STREAMING_API: process.env.LBRY_WEB_STREAMING_API, // player.odysee.com
LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API, LBRY_WEB_BUFFER_API: process.env.LBRY_WEB_BUFFER_API,
SEARCH_SERVER_API: process.env.SEARCH_SERVER_API, SEARCH_SERVER_API: process.env.SEARCH_SERVER_API,
CLOUD_CONNECT_SITE_NAME: process.env.CLOUD_CONNECT_SITE_NAME, CLOUD_CONNECT_SITE_NAME: process.env.CLOUD_CONNECT_SITE_NAME,

View file

@ -57,7 +57,7 @@ mainInstance.waitUntilValid(() => {
console.log(data.toString()); console.log(data.toString());
}); });
process.on('SIGINT', function () { process.on('SIGINT', function() {
console.log('Killing threads...'); console.log('Killing threads...');
child.kill('SIGINT'); child.kill('SIGINT');

View file

@ -37,7 +37,7 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
} }
if (response) if (response)
return response.json().then(json => { { return response.json().then(json => {
let error; let error;
if (json.error) { if (json.error) {
error = new Error(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 error.response = response; // This is primarily a hack used in actions/user.js
return Promise.reject(error); return Promise.reject(error);
}); }); }
} }
function makeRequest(url, options) { function makeRequest(url, options) {

View file

@ -54,7 +54,7 @@ const recsys = {
* @param parentClaimId: string, * @param parentClaimId: string,
* @param newClaimId: string, * @param newClaimId: string,
*/ */
onClickedRecommended: function (parentClaimId, newClaimId) { onClickedRecommended: function(parentClaimId, newClaimId) {
const parentEntry = recsys.entries[parentClaimId] ? recsys.entries[parentClaimId] : null; const parentEntry = recsys.entries[parentClaimId] ? recsys.entries[parentClaimId] : null;
const parentUuid = parentEntry['uuid']; const parentUuid = parentEntry['uuid'];
const parentRecommendedClaims = parentEntry['recClaimIds'] || []; 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. * Page was loaded. Get or Create entry and populate it with default data, plus recommended content, recsysId, etc.
* Called from recommendedContent component * Called from recommendedContent component
*/ */
onRecsLoaded: function (claimId, uris) { onRecsLoaded: function(claimId, uris) {
if (window.store) { if (window.store) {
const state = window.store.getState(); const state = window.store.getState();
if (!recsys.entries[claimId]) { if (!recsys.entries[claimId]) {
@ -91,7 +91,7 @@ const recsys = {
* @param: claimId: string * @param: claimId: string
* @param: parentUuid: string (optional) * @param: parentUuid: string (optional)
*/ */
createRecsysEntry: function (claimId, parentUuid) { createRecsysEntry: function(claimId, parentUuid) {
if (window.store && claimId) { if (window.store && claimId) {
const state = window.store.getState(); const state = window.store.getState();
const user = selectUser(state); const user = selectUser(state);
@ -128,7 +128,7 @@ const recsys = {
* @param claimId * @param claimId
* @param isTentative * @param isTentative
*/ */
sendRecsysEntry: function (claimId, isTentative) { sendRecsysEntry: function(claimId, isTentative) {
const shareTelemetry = const shareTelemetry =
IS_WEB || (window && window.store && selectDaemonSettings(window.store.getState()).share_usage_data); IS_WEB || (window && window.store && selectDaemonSettings(window.store.getState()).share_usage_data);
@ -151,7 +151,7 @@ const recsys = {
* @param claimId * @param claimId
* @param event * @param event
*/ */
onRecsysPlayerEvent: function (claimId, event, isEmbedded) { onRecsysPlayerEvent: function(claimId, event, isEmbedded) {
if (!recsys.entries[claimId]) { if (!recsys.entries[claimId]) {
recsys.createRecsysEntry(claimId); recsys.createRecsysEntry(claimId);
// do something to show it's floating or autoplay // do something to show it's floating or autoplay
@ -162,7 +162,7 @@ const recsys = {
recsys.entries[claimId].events.push(event); recsys.entries[claimId].events.push(event);
recsys.log('onRecsysPlayerEvent', claimId); recsys.log('onRecsysPlayerEvent', claimId);
}, },
log: function (callName, claimId) { log: function(callName, claimId) {
if (recsys.debug) { if (recsys.debug) {
console.log(`Call: ***${callName}***, ClaimId: ${claimId}, Recsys Entries`, Object.assign({}, recsys.entries)); 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 * Player closed. Check to see if primaryUri = playingUri
* if so, send the Entry. * if so, send the Entry.
*/ */
onPlayerDispose: function (claimId, isEmbedded) { onPlayerDispose: function(claimId, isEmbedded) {
if (window.store) { if (window.store) {
const state = window.store.getState(); const state = window.store.getState();
const playingUri = selectPlayingUri(state); const playingUri = selectPlayingUri(state);
@ -221,7 +221,7 @@ const recsys = {
* Navigate event * Navigate event
* Send all claimIds that aren't currently playing. * Send all claimIds that aren't currently playing.
*/ */
onNavigate: function () { onNavigate: function() {
if (window.store) { if (window.store) {
const state = window.store.getState(); const state = window.store.getState();
const playingUri = selectPlayingUri(state); const playingUri = selectPlayingUri(state);

View file

@ -23,7 +23,6 @@ declare module 'async-exit-hook' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'async-exit-hook/index' { declare module 'async-exit-hook/index' {
declare module.exports: $Exports<'async-exit-hook'>; declare module.exports: $Exports<'async-exit-hook'>;

View file

@ -322,7 +322,7 @@ declare class Bluebird$Defer {
reject: (value: any) => any; reject: (value: any) => any;
} }
declare module "bluebird" { declare module 'bluebird' {
declare module.exports: typeof Bluebird$Promise; declare module.exports: typeof Bluebird$Promise;
declare type Disposable<T> = Bluebird$Disposable<T>; declare type Disposable<T> = Bluebird$Disposable<T>;

View file

@ -3,7 +3,7 @@
// From: https://github.com/chalk/chalk/blob/master/index.js.flow // From: https://github.com/chalk/chalk/blob/master/index.js.flow
declare module "chalk" { declare module 'chalk' {
declare type TemplateStringsArray = $ReadOnlyArray<string>; declare type TemplateStringsArray = $ReadOnlyArray<string>;
declare type Level = $Values<{ declare type Level = $Values<{

View file

@ -8,16 +8,16 @@ type $npm$classnames$Classes =
| void | void
| null; | null;
declare module "classnames" { declare module 'classnames' {
declare module.exports: ( declare module.exports: (
...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]> ...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]>
) => string; ) => string;
} }
declare module "classnames/bind" { declare module 'classnames/bind' {
declare module.exports: $Exports<"classnames">; declare module.exports: $Exports<"classnames">;
} }
declare module "classnames/dedupe" { declare module 'classnames/dedupe' {
declare module.exports: $Exports<"classnames">; declare module.exports: $Exports<"classnames">;
} }

View file

@ -23,7 +23,6 @@ declare module 'decompress' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'decompress/index' { declare module 'decompress/index' {
declare module.exports: $Exports<'decompress'>; declare module.exports: $Exports<'decompress'>;

View file

@ -37,7 +37,7 @@ type $npm$del$Options = {
absolute?: boolean absolute?: boolean
}; };
declare module "del" { declare module 'del' {
declare class Del { declare class Del {
( (
patterns: $npm$del$Patterns, patterns: $npm$del$Patterns,

View file

@ -23,7 +23,6 @@ declare module 'electron-dl' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'electron-dl/index' { declare module 'electron-dl/index' {
declare module.exports: $Exports<'electron-dl'>; declare module.exports: $Exports<'electron-dl'>;

View file

@ -23,7 +23,6 @@ declare module 'electron-is-dev' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'electron-is-dev/index' { declare module 'electron-is-dev/index' {
declare module.exports: $Exports<'electron-is-dev'>; declare module.exports: $Exports<'electron-is-dev'>;

View file

@ -23,7 +23,6 @@ declare module 'electron-window-state' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'electron-window-state/index' { declare module 'electron-window-state/index' {
declare module.exports: $Exports<'electron-window-state'>; declare module.exports: $Exports<'electron-window-state'>;

View file

@ -23,7 +23,6 @@ declare module 'eslint-config-standard-jsx' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'eslint-config-standard-jsx/index' { declare module 'eslint-config-standard-jsx/index' {
declare module.exports: $Exports<'eslint-config-standard-jsx'>; declare module.exports: $Exports<'eslint-config-standard-jsx'>;

View file

@ -23,7 +23,6 @@ declare module 'eslint-config-standard' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'eslint-config-standard/index' { declare module 'eslint-config-standard/index' {
declare module.exports: $Exports<'eslint-config-standard'>; declare module.exports: $Exports<'eslint-config-standard'>;

View file

@ -1,8 +1,8 @@
// flow-typed signature: 164dcf1c9105e51cb17a374a807146a7 // flow-typed signature: 164dcf1c9105e51cb17a374a807146a7
// flow-typed version: c7f4cf7a4d/express_v4.16.x/flow_>=v0.93.x // flow-typed version: c7f4cf7a4d/express_v4.16.x/flow_>=v0.93.x
import * as http from "http"; import * as http from 'http';
import type { Socket } from "net"; import type { Socket } from 'net';
declare type express$RouterOptions = { declare type express$RouterOptions = {
caseSensitive?: boolean, caseSensitive?: boolean,
@ -284,7 +284,7 @@ declare type express$UrlEncodedOptions = {
) => mixed, ) => mixed,
} }
declare module "express" { declare module 'express' {
declare export type RouterOptions = express$RouterOptions; declare export type RouterOptions = express$RouterOptions;
declare export type CookieOptions = express$CookieOptions; declare export type CookieOptions = express$CookieOptions;
declare export type Middleware = express$Middleware; declare export type Middleware = express$Middleware;

View file

@ -1,6 +1,6 @@
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x // 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; declare module.exports: string;
} }

View file

@ -23,7 +23,6 @@ declare module 'json-loader' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'json-loader/index' { declare module 'json-loader/index' {
declare module.exports: $Exports<'json-loader'>; declare module.exports: $Exports<'json-loader'>;

View file

@ -23,7 +23,6 @@ declare module 'lbry-format' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'lbry-format/index' { declare module 'lbry-format/index' {
declare module.exports: $Exports<'lbry-format'>; declare module.exports: $Exports<'lbry-format'>;

View file

@ -3,11 +3,11 @@
declare module 'mixpanel-browser' { declare module 'mixpanel-browser' {
declare type People = { declare type People = {
set(prop: Object|String, to?: any, callback?: Function): void; set(prop: Object | String, to?: any, callback?: Function): void;
set_once(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; increment(prop: Object | string, by?: number, callback?: Function): void;
append(prop: Object|string, value?: any, callback?: Function): void; append(prop: Object | string, value?: any, callback?: Function): void;
union(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; track_charge(amount: number, properties?: Object, callback?: Function): void;
clear_charges(callback?: Function): void; clear_charges(callback?: Function): void;
delete_user(): void; delete_user(): void;
@ -18,8 +18,8 @@ declare module 'mixpanel-browser' {
push(item: [string, Object]): void; push(item: [string, Object]): void;
disable(events?: string[]): void; disable(events?: string[]): void;
track(event_name: string, properties?: Object, callback?: Function): void; track(event_name: string, properties?: Object, callback?: Function): void;
track_links(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; track_forms(query: Object | string, event_name: string, properties?: Object | Function): void;
time_event(event_name: string): void; time_event(event_name: string): void;
register(properties: Object, days?: number): void; register(properties: Object, days?: number): void;
register_once(properties: Object, default_value?: any, days?: number): void; register_once(properties: Object, default_value?: any, days?: number): void;

View file

@ -69,8 +69,7 @@ declare class moment$LocaleData {
isPM(date: string): boolean; isPM(date: string): boolean;
meridiem(hours: number, minutes: number, isLower: boolean): string; meridiem(hours: number, minutes: number, isLower: boolean): string;
calendar( calendar(
key: key: | "sameDay"
| "sameDay"
| "nextDay" | "nextDay"
| "lastDay" | "lastDay"
| "nextWeek" | "nextWeek"
@ -123,8 +122,7 @@ declare class moment$Moment {
static ISO_8601: string; static ISO_8601: string;
static (string?: ?string): moment$Moment; static (string?: ?string): moment$Moment;
static ( static (
initDate: initDate: | moment$MomentOptions
| moment$MomentOptions
| number | number
| Date | Date
| Array<number> | Array<number>
@ -157,8 +155,7 @@ declare class moment$Moment {
static unix(seconds: number): moment$Moment; static unix(seconds: number): moment$Moment;
static utc(): moment$Moment; static utc(): moment$Moment;
static utc( static utc(
initDate: initDate: | moment$MomentOptions
| moment$MomentOptions
| number | number
| Date | Date
| Array<number> | Array<number>
@ -373,6 +370,6 @@ declare class moment$Moment {
static invalid(object: any): moment$Moment; static invalid(object: any): moment$Moment;
} }
declare module "moment" { declare module 'moment' {
declare module.exports: Class<moment$Moment>; declare module.exports: Class<moment$Moment>;
} }

View file

@ -23,7 +23,6 @@ declare module 'node-loader' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'node-loader/index' { declare module 'node-loader/index' {
declare module.exports: $Exports<'node-loader'>; declare module.exports: $Exports<'node-loader'>;

View file

@ -1,7 +1,7 @@
// flow-typed signature: 066c92e9ccb5f0711df8d73cbca837d6 // flow-typed signature: 066c92e9ccb5f0711df8d73cbca837d6
// flow-typed version: 9e32affdbd/prettier_v1.x.x/flow_>=v0.56.x // 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 AST = Object;
declare export type Doc = Object; declare export type Doc = Object;
declare export type FastPath = Object; declare export type FastPath = Object;

View file

@ -23,7 +23,6 @@ declare module 'raw-loader' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'raw-loader/index' { declare module 'raw-loader/index' {
declare module.exports: $Exports<'raw-loader'>; declare module.exports: $Exports<'raw-loader'>;

View file

@ -2,7 +2,7 @@
// flow-typed version: 9d7a8571fd/react-hot-loader_v4.6.x/flow_>=v0.53.0 // flow-typed version: 9d7a8571fd/react-hot-loader_v4.6.x/flow_>=v0.53.0
// @flow // @flow
declare module "react-hot-loader" { declare module 'react-hot-loader' {
declare type Module = { declare type Module = {
id: string, id: string,
}; };
@ -50,7 +50,7 @@ declare module "react-hot-loader" {
declare export function setConfig(config: $Shape<Config>): void 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'; import type { ContainerProps } from 'react-hot-loader';
declare export function hot<T: React$ComponentType<any>>( declare export function hot<T: React$ComponentType<any>>(

View file

@ -31,7 +31,7 @@ Decrypting the abbreviations:
EFO = Extra factory options (used only in connectAdvanced) EFO = Extra factory options (used only in connectAdvanced)
*/ */
declare module "react-redux" { declare module 'react-redux' {
// ------------------------------------------------------------ // ------------------------------------------------------------
// Typings for connect() // Typings for connect()
// ------------------------------------------------------------ // ------------------------------------------------------------

View file

@ -1,7 +1,7 @@
// flow-typed signature: 7d44bba9041ba487f4fa83ab9d1bd3c3 // flow-typed signature: 7d44bba9041ba487f4fa83ab9d1bd3c3
// flow-typed version: 064c20def6/react-toggle_v4.0.x/flow_>=v0.54.x // flow-typed version: 064c20def6/react-toggle_v4.0.x/flow_>=v0.54.x
declare module "react-toggle" { declare module 'react-toggle' {
declare type Icons = { declare type Icons = {
checked?: React$Node, checked?: React$Node,
unchecked?: React$Node unchecked?: React$Node

View file

@ -23,7 +23,6 @@ declare module 'remark-react' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'remark-react/index' { declare module 'remark-react/index' {
declare module.exports: $Exports<'remark-react'>; declare module.exports: $Exports<'remark-react'>;

View file

@ -23,7 +23,6 @@ declare module 'remark' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'remark/index' { declare module 'remark/index' {
declare module.exports: $Exports<'remark'>; declare module.exports: $Exports<'remark'>;

View file

@ -23,7 +23,6 @@ declare module 'render-media' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'render-media/index' { declare module 'render-media/index' {
declare module.exports: $Exports<'render-media'>; declare module.exports: $Exports<'render-media'>;

View file

@ -3,7 +3,7 @@
type ExtractReturnType = <Return>((...rest: any[]) => Return) => Return; type ExtractReturnType = <Return>((...rest: any[]) => Return) => Return;
declare module "reselect" { declare module 'reselect' {
declare type InputSelector<-TState, TProps, TResult> = declare type InputSelector<-TState, TProps, TResult> =
(state: TState, props: TProps, ...rest: any[]) => TResult (state: TState, props: TProps, ...rest: any[]) => TResult

View file

@ -1,7 +1,7 @@
// flow-typed signature: dc381ee55406f66b7272c6343db0834b // flow-typed signature: dc381ee55406f66b7272c6343db0834b
// flow-typed version: da30fe6876/semver_v5.1.x/flow_>=v0.25.x // flow-typed version: da30fe6876/semver_v5.1.x/flow_>=v0.25.x
declare module "semver" { declare module 'semver' {
declare type Release = declare type Release =
| "major" | "major"
| "premajor" | "premajor"

View file

@ -23,7 +23,6 @@ declare module 'stream-to-blob-url' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'stream-to-blob-url/index' { declare module 'stream-to-blob-url/index' {
declare module.exports: $Exports<'stream-to-blob-url'>; declare module.exports: $Exports<'stream-to-blob-url'>;

View file

@ -64,8 +64,7 @@ declare module 'webpack' {
declare type ExternalItem = declare type ExternalItem =
| string | string
| { | {
[k: string]: [k: string]: | string
| string
| { | {
[k: string]: any, [k: string]: any,
} }
@ -81,14 +80,12 @@ declare module 'webpack' {
callback: (err?: Error, result?: string) => void callback: (err?: Error, result?: string) => void
) => void) ) => void)
| ExternalItem | ExternalItem
| Array< | Array<| ((
| ((
context: string, context: string,
request: string, request: string,
callback: (err?: Error, result?: string) => void callback: (err?: Error, result?: string) => void
) => void) ) => void)
| ExternalItem | ExternalItem>;
>;
declare type RuleSetCondition = declare type RuleSetCondition =
| RegExp | RegExp
@ -146,8 +143,7 @@ declare module 'webpack' {
rules?: RuleSetRules, rules?: RuleSetRules,
sideEffects?: boolean, sideEffects?: boolean,
test?: RuleSetConditionOrConditions, test?: RuleSetConditionOrConditions,
type?: type?: | 'javascript/auto'
| 'javascript/auto'
| 'javascript/dynamic' | 'javascript/dynamic'
| 'javascript/esm' | 'javascript/esm'
| 'json' | 'json'
@ -197,8 +193,7 @@ declare module 'webpack' {
declare type OptimizationSplitChunksOptions = { declare type OptimizationSplitChunksOptions = {
automaticNameDelimiter?: string, automaticNameDelimiter?: string,
cacheGroups?: { cacheGroups?: {
[k: string]: [k: string]: | false
| false
| Function | Function
| string | string
| RegExp | RegExp
@ -255,8 +250,7 @@ declare module 'webpack' {
providedExports?: boolean, providedExports?: boolean,
removeAvailableModules?: boolean, removeAvailableModules?: boolean,
removeEmptyChunks?: boolean, removeEmptyChunks?: boolean,
runtimeChunk?: runtimeChunk?: | boolean
| boolean
| ('single' | 'multiple') | ('single' | 'multiple')
| { | {
name?: string | Function, name?: string | Function,
@ -273,8 +267,7 @@ declare module 'webpack' {
}; };
declare type OutputOptions = { declare type OutputOptions = {
auxiliaryComment?: auxiliaryComment?: | string
| string
| { | {
amd?: string, amd?: string,
commonjs?: string, commonjs?: string,
@ -302,8 +295,7 @@ declare module 'webpack' {
jsonpScriptType?: false | 'text/javascript' | 'module', jsonpScriptType?: false | 'text/javascript' | 'module',
library?: string | Array<string> | LibraryCustomUmdObject, library?: string | Array<string> | LibraryCustomUmdObject,
libraryExport?: string | ArrayOfStringValues, libraryExport?: string | ArrayOfStringValues,
libraryTarget?: libraryTarget?: | 'var'
| 'var'
| 'assign' | 'assign'
| 'this' | 'this'
| 'window' | 'window'
@ -337,8 +329,7 @@ declare module 'webpack' {
declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>; declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>;
declare type ResolveOptions = { declare type ResolveOptions = {
alias?: alias?: | { [k: string]: string }
| { [k: string]: string }
| Array<{ | Array<{
alias?: string, alias?: string,
name?: string, name?: string,
@ -384,8 +375,7 @@ declare module 'webpack' {
chunkOrigins?: boolean, chunkOrigins?: boolean,
chunks?: boolean, chunks?: boolean,
chunksSort?: string, chunksSort?: string,
colors?: colors?: | boolean
| boolean
| { | {
bold?: string, bold?: string,
cyan?: string, cyan?: string,
@ -448,8 +438,7 @@ declare module 'webpack' {
disableHostCheck?: boolean, disableHostCheck?: boolean,
filename?: string, filename?: string,
headers?: { [key: string]: string }, headers?: { [key: string]: string },
historyApiFallback?: historyApiFallback?: | boolean
| boolean
| { | {
rewrites?: Array<{ from: string, to: string }>, rewrites?: Array<{ from: string, to: string }>,
disableDotRule?: boolean, disableDotRule?: boolean,
@ -457,8 +446,7 @@ declare module 'webpack' {
host?: string, host?: string,
hot?: boolean, hot?: boolean,
hotOnly?: boolean, hotOnly?: boolean,
https?: https?: | boolean
| boolean
| { | {
key: string, key: string,
cert: string, cert: string,
@ -470,8 +458,7 @@ declare module 'webpack' {
noInfo?: boolean, noInfo?: boolean,
open?: boolean | string, open?: boolean | string,
openPage?: string, openPage?: string,
overlay?: overlay?: | boolean
| boolean
| { | {
errors?: boolean, errors?: boolean,
warnings?: boolean, warnings?: boolean,
@ -506,8 +493,7 @@ declare module 'webpack' {
watchOptions?: WatchOptions, watchOptions?: WatchOptions,
publicPath?: string, publicPath?: string,
}, },
devtool?: devtool?: | '@cheap-eval-source-map'
| '@cheap-eval-source-map'
| '@cheap-module-eval-source-map' | '@cheap-module-eval-source-map'
| '@cheap-module-source-map' | '@cheap-module-source-map'
| '@cheap-source-map' | '@cheap-source-map'
@ -568,8 +554,7 @@ declare module 'webpack' {
resolveLoader?: ResolveOptions, resolveLoader?: ResolveOptions,
serve?: { [k: string]: any }, serve?: { [k: string]: any },
stats?: StatsOptions, stats?: StatsOptions,
target?: target?: | 'web'
| 'web'
| 'webworker' | 'webworker'
| 'node' | 'node'
| 'async-node' | 'async-node'

View file

@ -23,7 +23,6 @@ declare module 'y18n' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'y18n/index' { declare module 'y18n/index' {
declare module.exports: $Exports<'y18n'>; declare module.exports: $Exports<'y18n'>;

View file

@ -23,7 +23,6 @@ declare module 'yarnhook' {
* needed. * needed.
*/ */
// Filename aliases // Filename aliases
declare module 'yarnhook/index' { declare module 'yarnhook/index' {
declare module.exports: $Exports<'yarnhook'>; declare module.exports: $Exports<'yarnhook'>;

View file

@ -5,5 +5,3 @@ declare type ReportContentState = {
isReporting: boolean, isReporting: boolean,
error: string, error: string,
}; };

View file

@ -95,8 +95,8 @@ const YOUTUBER_CHANNEL_IDS = [
channelLimit: 1, channelLimit: 1,
daysOfContent: 30, daysOfContent: 30,
pageSize: 24, pageSize: 24,
//pinnedUrls: [], // pinnedUrls: [],
//mixIn: [], // mixIn: [],
}; };
module.exports = { YOUTUBERS }; module.exports = { YOUTUBERS };

View file

@ -1,7 +1,7 @@
module.exports = { module.exports = {
plugins: { plugins: {
'postcss-import': { 'postcss-import': {
resolve: function (id) { resolve: function(id) {
// Handle ~ imports for node_modules // Handle ~ imports for node_modules
if (id.startsWith('~')) { if (id.startsWith('~')) {
try { try {
@ -11,7 +11,7 @@ module.exports = {
} }
} }
return id; return id;
} },
}, },
cssnano: process.env.NODE_ENV === 'production' ? {} : false, 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

View file

@ -236,7 +236,15 @@ function App(props: Props) {
fetchModBlockedList(); fetchModBlockedList();
fetchModAmIList(); fetchModAmIList();
} }
}, [hasMyChannels, hasNoChannels, hasActiveChannelClaim, setActiveChannelIfNotSet, setIncognito]); }, [
fetchModAmIList,
fetchModBlockedList,
hasMyChannels,
hasNoChannels,
hasActiveChannelClaim,
setActiveChannelIfNotSet,
setIncognito,
]);
useEffect(() => { useEffect(() => {
// $FlowFixMe // $FlowFixMe

View file

@ -102,7 +102,7 @@ function ChannelContent(props: Props) {
} }
}, DEBOUNCE_WAIT_DURATION_MS); }, DEBOUNCE_WAIT_DURATION_MS);
return () => clearTimeout(timer); return () => clearTimeout(timer);
}, [claimId, searchQuery, showMature]); }, [claimId, doResolveUris, searchQuery, showMature]);
React.useEffect(() => { React.useEffect(() => {
setSearchQuery(''); setSearchQuery('');

View file

@ -121,7 +121,7 @@ function ChannelForm(props: Props) {
bidError || bidError ||
(isNewChannel && !params.name) (isNewChannel && !params.name)
); );
}, [isClaimingInitialRewards, creatingChannel, updatingChannel, nameError, bidError, isNewChannel, params.name]); }, [coverError, isClaimingInitialRewards, creatingChannel, updatingChannel, bidError, isNewChannel, params.name]);
function getChannelParams() { function getChannelParams() {
// fill this in with sdk data // fill this in with sdk data

View file

@ -385,7 +385,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
</NavLink> </NavLink>
)} )}
</div> </div>
<div className="claim-tile__info" uri={uri}> <div className="claim-tile__info">
{!isChannelUri && signingChannel && ( {!isChannelUri && signingChannel && (
<div className="claim-preview__channel-staked"> <div className="claim-preview__channel-staked">
<UriIndicator focusable={false} uri={uri} link hideAnonymous> <UriIndicator focusable={false} uri={uri} link hideAnonymous>

View file

@ -260,7 +260,7 @@ function CollectionForm(props: Props) {
const collectionClaimIds = JSON.parse(collectionClaimIdsString); const collectionClaimIds = JSON.parse(collectionClaimIdsString);
setParams({ ...params, claims: collectionClaimIds }); setParams({ ...params, claims: collectionClaimIds });
clearCollectionErrors(); clearCollectionErrors();
}, [collectionClaimIdsString, setParams]); }, [clearCollectionErrors, params, collectionClaimIdsString, setParams]);
React.useEffect(() => { React.useEffect(() => {
let nameError; let nameError;
@ -302,14 +302,14 @@ function CollectionForm(props: Props) {
setParam({ channel_id: undefined }); setParam({ channel_id: undefined });
} }
} }
}, [activeChannelId, incognito, initialized]); }, [setParam, activeChannelId, incognito, initialized]);
// setup initial params after we're sure if it's published or not // setup initial params after we're sure if it's published or not
React.useEffect(() => { React.useEffect(() => {
if (!uri || (uri && hasClaim)) { if (!uri || (uri && hasClaim)) {
updateParams(getCollectionParams()); updateParams(getCollectionParams());
} }
}, [uri, hasClaim]); }, [uri, hasClaim, getCollectionParams, updateParams]);
React.useEffect(() => { React.useEffect(() => {
resetThumbnailStatus(); resetThumbnailStatus();

View file

@ -58,7 +58,7 @@ function FileList(props: Props) {
} }
} }
} }
}, [radio, onChange]); }, [radio, onChange, getFile]);
return ( return (
<div className={'file-list'}> <div className={'file-list'}>

View file

@ -23,7 +23,7 @@ function LoginGraphic(props: any) {
} else { } else {
setSrc(imgUrl); setSrc(imgUrl);
} }
}, []); }, [imgUrl]);
if (error || !imgUrl) { if (error || !imgUrl) {
return null; return null;

View file

@ -120,7 +120,7 @@ function PublishFile(props: Props) {
processSelectedFile(fileData); processSelectedFile(fileData);
} }
readSelectedFileDetails(); readSelectedFileDetails();
}, [filePath]); }, [filePath, processSelectedFile]);
useEffect(() => { useEffect(() => {
const isOptimizeAvail = currentFile && currentFile !== '' && isVid && ffmpegAvail; const isOptimizeAvail = currentFile && currentFile !== '' && isVid && ffmpegAvail;

View file

@ -262,7 +262,7 @@ function PublishForm(props: Props) {
if (publishing || publishSuccess) { if (publishing || publishSuccess) {
clearPublish(); clearPublish();
} }
}, [clearPublish]); }, [clearPublish, publishing, publishSuccess]);
useEffect(() => { useEffect(() => {
if (!thumbnail) { if (!thumbnail) {
@ -363,7 +363,7 @@ function PublishForm(props: Props) {
const newParams = new URLSearchParams(); const newParams = new URLSearchParams();
newParams.set(TYPE_PARAM, mode.toLowerCase()); newParams.set(TYPE_PARAM, mode.toLowerCase());
replace({ search: newParams.toString() }); replace({ search: newParams.toString() });
}, [mode, _uploadType]); }, [mode, _uploadType, replace]);
// @if TARGET='app' // @if TARGET='app'
// Save file changes locally ( desktop ) // Save file changes locally ( desktop )

View file

@ -87,7 +87,7 @@ export default function ReportContent(props: Props) {
claim_ids: [claimId], claim_ids: [claimId],
}); });
} }
}, [claim, claimId]); }, [claim, claimId, doClaimSearch]);
// On mount, pause player and get the timestamp, if applicable. // On mount, pause player and get the timestamp, if applicable.
React.useEffect(() => { React.useEffect(() => {
@ -102,7 +102,7 @@ export default function ReportContent(props: Props) {
const str = (n) => n.toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); const str = (n) => n.toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false });
updateInput('timestamp', str(h) + ':' + str(m) + ':' + str(s)); updateInput('timestamp', str(h) + ':' + str(m) + ':' + str(s));
} }
}, []); }, [updateInput]);
React.useEffect(() => { React.useEffect(() => {
let timer; let timer;

View file

@ -196,7 +196,7 @@ function RepostCreate(props: Props) {
if (repostTakeoverAmount) { if (repostTakeoverAmount) {
setAutoRepostBid(repostTakeoverAmount); setAutoRepostBid(repostTakeoverAmount);
} }
}, [enteredRepostAmount, passedRepostAmount]); }, [setAutoRepostBid, enteredRepostAmount, passedRepostAmount]);
// repost bid error // repost bid error
React.useEffect(() => { React.useEffect(() => {
@ -211,7 +211,7 @@ function RepostCreate(props: Props) {
rBidError = __('Your deposit must be higher'); rBidError = __('Your deposit must be higher');
} }
setRepostBidError(rBidError); setRepostBidError(rBidError);
}, [setRepostBidError, repostBidError, repostBid]); }, [balance, setRepostBidError, repostBidError, repostBid]);
// setContentUri given enteredUri // setContentUri given enteredUri
React.useEffect(() => { React.useEffect(() => {

View file

@ -67,7 +67,7 @@ const SearchOptions = (props: Props) => {
if (options[SEARCH_OPTIONS.RESULT_COUNT] !== SEARCH_PAGE_SIZE) { if (options[SEARCH_OPTIONS.RESULT_COUNT] !== SEARCH_PAGE_SIZE) {
setSearchOption(SEARCH_OPTIONS.RESULT_COUNT, SEARCH_PAGE_SIZE); setSearchOption(SEARCH_OPTIONS.RESULT_COUNT, SEARCH_PAGE_SIZE);
} }
}, []); }, [options, setSearchOption]);
function updateSearchOptions(option, value) { function updateSearchOptions(option, value) {
setSearchOption(option, value); setSearchOption(option, value);

View file

@ -34,7 +34,7 @@ export default function SettingStorage(props: Props) {
cleanBlobs().then(() => { cleanBlobs().then(() => {
setCleaning(false); setCleaning(false);
}); });
}, []); }, [cleanBlobs]);
return ( return (
<> <>

View file

@ -105,7 +105,7 @@ function SettingViewHosting(props: Props) {
if (unlimited && viewHostingLimit !== 0) { if (unlimited && viewHostingLimit !== 0) {
handleApply(); handleApply();
} }
}, [unlimited, viewHostingLimit]); }, [handleApply, unlimited, viewHostingLimit]);
return ( return (
<> <>

View file

@ -73,27 +73,27 @@ function SettingWalletServer(props: Props) {
doClear(); doClear();
} }
}, },
[] [doClear]
); );
useEffect(() => { useEffect(() => {
if (hasWalletServerPrefs) { if (hasWalletServerPrefs) {
setUsingCustomServer(true); setUsingCustomServer(true);
} }
}, []); }, [hasWalletServerPrefs]);
useEffect(() => { useEffect(() => {
const interval = setInterval(() => { const interval = setInterval(() => {
getDaemonStatus(); getDaemonStatus();
}, STATUS_INTERVAL); }, STATUS_INTERVAL);
return () => clearInterval(interval); return () => clearInterval(interval);
}, []); }, [getDaemonStatus]);
useEffect(() => { useEffect(() => {
if (walletRollbackToDefault) { if (walletRollbackToDefault) {
doClear(); doClear();
} }
}, [walletRollbackToDefault]); }, [doClear, walletRollbackToDefault]);
useEffect(() => { useEffect(() => {
if (usingCustomServer) { if (usingCustomServer) {

View file

@ -89,7 +89,14 @@ const SupportsLiquidate = (props: Props) => {
} }
setUnlockTextAmount(String(defaultValue)); setUnlockTextAmount(String(defaultValue));
setDefaultValueAssigned(true); setDefaultValueAssigned(true);
}, [defaultValueAssigned, previewBalance, unlockTextAmount, setUnlockTextAmount, setDefaultValueAssigned]); }, [
defaultValue,
defaultValueAssigned,
previewBalance,
unlockTextAmount,
setUnlockTextAmount,
setDefaultValueAssigned,
]);
// Update message & error based on unlock amount. // Update message & error based on unlock amount.
useEffect(() => { useEffect(() => {
@ -117,7 +124,7 @@ const SupportsLiquidate = (props: Props) => {
setMessage(initialMessage); setMessage(initialMessage);
setError(false); setError(false);
} }
}, [unlockTextAmount, previewBalance, setMessage, setError]); }, [initialMessage, unlockTextAmount, previewBalance, setMessage, setError]);
return ( return (
<Card <Card

View file

@ -34,16 +34,8 @@ const SHARED_KEY = 'shared';
const LOCAL_KEY = 'local'; const LOCAL_KEY = 'local';
function SyncEnableFlow(props: Props) { function SyncEnableFlow(props: Props) {
const { const { setSyncEnabled, getSyncError, getSyncPending, getSync, checkSync, mode, closeModal, updatePreferences } =
setSyncEnabled, props;
getSyncError,
getSyncPending,
getSync,
checkSync,
mode,
closeModal,
updatePreferences,
} = props;
const [step, setStep] = React.useState(INITIAL); const [step, setStep] = React.useState(INITIAL);
const [prefDict, setPrefDict]: [any, (any) => void] = React.useState(); const [prefDict, setPrefDict]: [any, (any) => void] = React.useState();
@ -118,7 +110,7 @@ function SyncEnableFlow(props: Props) {
setStep(FETCH_FOR_DISABLE); setStep(FETCH_FOR_DISABLE);
} }
} }
}, [mode, setPassword]); }, [mode, setPassword, checkSync]);
React.useEffect(() => { React.useEffect(() => {
if (step === FETCH_FOR_ENABLE) { if (step === FETCH_FOR_ENABLE) {
@ -146,7 +138,7 @@ function SyncEnableFlow(props: Props) {
setStep(CONFIRM); setStep(CONFIRM);
}); });
} }
}, [step, setPrefDict, setStep, password]); }, [step, setPrefDict, setStep, password, getSync]);
if (getSyncPending) { if (getSyncPending) {
return ( return (

View file

@ -15,7 +15,7 @@ export default function TextareaSuggestionsItem(props: Props) {
const { name: value, url, unicode } = emote; const { name: value, url, unicode } = emote;
return ( return (
<div {...autocompleteProps} dispatch={undefined}> <div {...autocompleteProps}>
{unicode ? <div className="emote">{unicode}</div> : <img className="emote" src={url} />} {unicode ? <div className="emote">{unicode}</div> : <img className="emote" src={url} />}
<div className="textareaSuggestion__label"> <div className="textareaSuggestion__label">
@ -31,7 +31,7 @@ export default function TextareaSuggestionsItem(props: Props) {
const value = claim.canonical_url.replace('lbry://', '').replace('#', ':'); const value = claim.canonical_url.replace('lbry://', '').replace('#', ':');
return ( return (
<div {...autocompleteProps} dispatch={undefined}> <div {...autocompleteProps}>
<ChannelThumbnail xsmall uri={uri} /> <ChannelThumbnail xsmall uri={uri} />
<div className="textareaSuggestion__label"> <div className="textareaSuggestion__label">

View file

@ -56,7 +56,7 @@ function UserChannelFollowIntro(props: Props) {
}; };
setTimeout(delayedChannelSubscribe, 1000); setTimeout(delayedChannelSubscribe, 1000);
} }
}, [prefsReady]); }, [prefsReady, channelSubscribe]);
return ( return (
<Card <Card

View file

@ -87,7 +87,7 @@ function UserEmailNew(props: Props) {
if (emailExists) { if (emailExists) {
handleChangeToSignIn(); handleChangeToSignIn();
} }
}, [emailExists]); }, [emailExists, handleChangeToSignIn]);
return ( return (
<div className={classnames('main__sign-up')}> <div className={classnames('main__sign-up')}>

View file

@ -7,10 +7,10 @@ import Spinner from 'component/spinner';
type Props = { type Props = {
user: ?User, user: ?User,
history: { push: string => void, replace: string => void }, history: { push: (string) => void, replace: (string) => void },
location: { search: string }, location: { search: string },
userFetchPending: boolean, userFetchPending: boolean,
doUserSignIn: string => void, doUserSignIn: (string) => void,
emailToVerify: ?string, emailToVerify: ?string,
passwordExists: boolean, passwordExists: boolean,
}; };
@ -30,7 +30,7 @@ function UserSignIn(props: Props) {
if (hasVerifiedEmail || (!showEmail && !showPassword && !showLoading)) { if (hasVerifiedEmail || (!showEmail && !showPassword && !showLoading)) {
history.replace(redirect || '/'); history.replace(redirect || '/');
} }
}, [showEmail, showPassword, showLoading, hasVerifiedEmail]); }, [showEmail, showPassword, showLoading, hasVerifiedEmail, history, redirect]);
React.useEffect(() => { React.useEffect(() => {
if (emailToVerify && emailOnlyLogin) { if (emailToVerify && emailOnlyLogin) {

View file

@ -110,7 +110,7 @@ function UserSignUp(props: Props) {
if (previousHasVerifiedEmail === false && hasVerifiedEmail && prefsReady) { if (previousHasVerifiedEmail === false && hasVerifiedEmail && prefsReady) {
setSettingAndSync(SETTINGS.FIRST_RUN_STARTED, true); setSettingAndSync(SETTINGS.FIRST_RUN_STARTED, true);
} }
}, [hasVerifiedEmail, previousHasVerifiedEmail, prefsReady]); }, [hasVerifiedEmail, previousHasVerifiedEmail, prefsReady, setSettingAndSync]);
React.useEffect(() => { React.useEffect(() => {
// Don't claim the reward if sync is enabled until after a sync has been completed successfully // Don't claim the reward if sync is enabled until after a sync has been completed successfully

View file

@ -157,7 +157,7 @@ const VideoJsEvents = ({
.getChild('TheaterModeButton') .getChild('TheaterModeButton')
.controlText(videoTheaterMode ? __('Default Mode (t)') : __('Theater Mode (t)')); .controlText(videoTheaterMode ? __('Default Mode (t)') : __('Theater Mode (t)'));
} }
}, [videoTheaterMode]); }, [videoTheaterMode, playerRef]);
// when user clicks 'Unmute' button, turn audio on and hide unmute button // when user clicks 'Unmute' button, turn audio on and hide unmute button
function unmuteAndHideHint() { function unmuteAndHideHint() {
@ -224,14 +224,14 @@ const VideoJsEvents = ({
autoplayButton.setAttribute('aria-checked', autoplaySetting); autoplayButton.setAttribute('aria-checked', autoplaySetting);
} }
} }
}, [autoplaySetting]); }, [autoplaySetting, playerRef]);
useEffect(() => { useEffect(() => {
const player = playerRef.current; const player = playerRef.current;
if (replay && player) { if (replay && player) {
player.play(); player.play();
} }
}, [replay]); }, [replay, playerRef]);
function initializeEvents() { function initializeEvents() {
const player = playerRef.current; const player = playerRef.current;

View file

@ -245,7 +245,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
window.player = undefined; window.player = undefined;
} }
}; };
}, [isAudio, source]); }, [isAudio, source, curried_function, createVideoPlayerDOM, detectFileType, initializeVideoPlayer]);
// Update video player and reload when source URL changes // Update video player and reload when source URL changes
useEffect(() => { useEffect(() => {
@ -279,7 +279,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
player.bigPlayButton.hide(); player.bigPlayButton.hide();
} }
}); });
}, [source, reload]); }, [source, reload, sourceType, videoJsOptions.sources]);
return ( return (
// $FlowFixMe // $FlowFixMe

View file

@ -24,5 +24,5 @@ export default function useHistoryNav(history) {
window.addEventListener('keydown', handleKeyPress); window.addEventListener('keydown', handleKeyPress);
} }
return () => window.removeEventListener('keydown', handleKeyPress); return () => window.removeEventListener('keydown', handleKeyPress);
}, [el]); }, [el, history]);
} }

View file

@ -71,7 +71,7 @@ export default function useLazyLoading(
// $FlowFixMe // $FlowFixMe
lazyLoadingObserver.observe(elementRef.current); lazyLoadingObserver.observe(elementRef.current);
}, deps); }, [backgroundFallback, elementRef, yOffsetPx]);
return srcLoaded; return srcLoaded;
} }

View file

@ -71,7 +71,7 @@ function ModalAffirmPurchase(props: Props) {
clearTimeout(timeout); clearTimeout(timeout);
} }
}; };
}, [success, uri]); }, [success, uri, closeModal]);
return ( return (
<Modal type="card" isOpen contentLabel={modalTitle} onAborted={cancelPurchase}> <Modal type="card" isOpen contentLabel={modalTitle} onAborted={cancelPurchase}>

View file

@ -92,11 +92,11 @@ function FileListPublished(props: Props) {
params.set('searchText', searchText); params.set('searchText', searchText);
history.replace('?' + params.toString()); history.replace('?' + params.toString());
debounceFilter(); debounceFilter();
}, [myClaims, searchText]); }, [myClaims, searchText, debounceFilter, history, search]);
useEffect(() => { useEffect(() => {
doFilterClaims(); doFilterClaims();
}, [myClaims, filterBy]); }, [myClaims, filterBy, doFilterClaims]);
const urlTotal = filteredClaims.length; const urlTotal = filteredClaims.length;
@ -118,7 +118,7 @@ function FileListPublished(props: Props) {
const params = new URLSearchParams(search); const params = new URLSearchParams(search);
params.set(PAGINATE_PARAM, '1'); params.set(PAGINATE_PARAM, '1');
history.replace('?' + params.toString()); history.replace('?' + params.toString());
}, [filteredClaims]); }, [filteredClaims, history, search]);
useEffect(() => { useEffect(() => {
fetchAllMyClaims(); fetchAllMyClaims();

View file

@ -77,7 +77,7 @@ export default function NotificationsPage(props: Props) {
// If there are unread notifications when entering the page, reset to All. // If there are unread notifications when entering the page, reset to All.
setName(NOTIFICATIONS.NOTIFICATION_NAME_ALL); setName(NOTIFICATIONS.NOTIFICATION_NAME_ALL);
} }
}, []); }, [setName, unreadCount, unseenCount]);
React.useEffect(() => { React.useEffect(() => {
if (unseenCount > 0) { if (unseenCount > 0) {
@ -104,7 +104,7 @@ export default function NotificationsPage(props: Props) {
} }
} }
} }
}, [name, notifications, stringifiedNotificationCategories]); }, [name, notifications, stringifiedNotificationCategories, doNotificationList]);
const notificationListElement = ( const notificationListElement = (
<> <>

View file

@ -53,7 +53,7 @@ export default function NotificationSettingsPage(props: Props) {
setError(true); setError(true);
}); });
} }
}, [isAuthenticated]); }, [lbryIoParams, isAuthenticated]);
function handleChangeTag(name, newIsEnabled) { function handleChangeTag(name, newIsEnabled) {
const tagParams = newIsEnabled ? { add: name } : { remove: name }; const tagParams = newIsEnabled ? { add: name } : { remove: name };

View file

@ -39,13 +39,13 @@ function SignInVerifyPage(props: Props) {
if (!authToken || !userSubmittedEmail || !verificationToken) { if (!authToken || !userSubmittedEmail || !verificationToken) {
onAuthError(__('Invalid or expired sign-in link.')); onAuthError(__('Invalid or expired sign-in link.'));
} }
}, [authToken, userSubmittedEmail, verificationToken, doToast, push]); }, [onAuthError, authToken, userSubmittedEmail, verificationToken, doToast, push]);
React.useEffect(() => { React.useEffect(() => {
if (!needsRecaptcha) { if (!needsRecaptcha) {
verifyUser(); verifyUser();
} }
}, [needsRecaptcha]); }, [verifyUser, needsRecaptcha]);
React.useEffect(() => { React.useEffect(() => {
let captchaTimeout; let captchaTimeout;

View file

@ -46,7 +46,7 @@ let baseConfig = {
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {
postcssOptions: { postcssOptions: {
plugins: function () { plugins: function() {
return [require('postcss-rtl')()]; return [require('postcss-rtl')()];
}, },
}, },
@ -102,7 +102,7 @@ let baseConfig = {
plugins: [ plugins: [
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }), new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }),
new webpack.EnvironmentPlugin({ 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({ new DefinePlugin({
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`, __static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,