mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-07-02 06:18:29 +07:00
eslint auto-fix
This commit is contained in:
parent
312156bdf8
commit
4c4461ea19
55 changed files with 107 additions and 110 deletions
|
@ -21,7 +21,7 @@ const CellShade: FC<Props> = ({ color, size = 50, ...rest }) => {
|
|||
|
||||
return `linear-gradient(7deg, ${normalized} ${size}px, ${transparentize(normalized, 1)} ${size *
|
||||
5}px)`;
|
||||
}, [color]);
|
||||
}, [color, size]);
|
||||
|
||||
return (
|
||||
<div {...rest} className={classNames(rest.className, styles.shade)} style={{ background }} />
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React, { FC, useState, useCallback, useEffect, useRef, useMemo } from 'react';
|
||||
import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { IFlowState } from '~/redux/flow/reducer';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
import { getURL } from '~/utils/dom';
|
||||
import { withRouter, RouteComponentProps, useHistory } from 'react-router';
|
||||
import { URLS, PRESETS } from '~/constants/urls';
|
||||
import { RouteComponentProps, useHistory, withRouter } from 'react-router';
|
||||
import { PRESETS, URLS } from '~/constants/urls';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import { INode } from '~/redux/types';
|
||||
|
||||
|
@ -32,7 +32,7 @@ const FlowHeroUnconnected: FC<IProps> = ({ heroes }) => {
|
|||
|
||||
const title = useMemo(() => {
|
||||
return loaded[current]?.title || '';
|
||||
}, [loaded, current, heroes]);
|
||||
}, [loaded, current]);
|
||||
|
||||
const onNext = useCallback(() => {
|
||||
if (heroes.length > limit) setLimit(limit + 1);
|
||||
|
@ -45,16 +45,16 @@ const FlowHeroUnconnected: FC<IProps> = ({ heroes }) => {
|
|||
|
||||
const goToNode = useCallback(() => {
|
||||
history.push(URLS.NODE_URL(loaded[current].id));
|
||||
}, [current, loaded]);
|
||||
}, [current, history, loaded]);
|
||||
|
||||
useEffect(() => {
|
||||
timer.current = setTimeout(onNext, 5000);
|
||||
return () => clearTimeout(timer.current);
|
||||
}, [current, timer.current]);
|
||||
}, [current, onNext]);
|
||||
|
||||
useEffect(() => {
|
||||
if (loaded.length === 1) onNext();
|
||||
}, [loaded]);
|
||||
}, [loaded, onNext]);
|
||||
|
||||
return (
|
||||
<div className={styles.wrap}>
|
||||
|
|
|
@ -61,7 +61,7 @@ const FlowStamp: FC<IProps> = ({
|
|||
) : (
|
||||
<Icon icon="search" size={24} className={styles.search_icon} />
|
||||
),
|
||||
[searchText]
|
||||
[onClearSearch, searchText]
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue