mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
eslint auto-fix
This commit is contained in:
parent
312156bdf8
commit
4c4461ea19
55 changed files with 107 additions and 110 deletions
|
@ -9,7 +9,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
const CommendDeleted: FC<IProps> = ({ id, onDelete }) => {
|
||||
const onRestore = useCallback(() => onDelete(id, false), [onDelete]);
|
||||
const onRestore = useCallback(() => onDelete(id, false), [id, onDelete]);
|
||||
|
||||
return (
|
||||
<div className={styles.wrap}>
|
||||
|
|
|
@ -10,7 +10,7 @@ interface Props {
|
|||
}
|
||||
|
||||
const NodeAuthorBlock: FC<Props> = ({ user }) => {
|
||||
const onOpenProfile = useCallback(() => openUserProfile(user?.username), [user?.username]);
|
||||
const onOpenProfile = useCallback(() => openUserProfile(user?.username), [user]);
|
||||
|
||||
const description = useUserDescription(user);
|
||||
|
||||
|
|
|
@ -4,10 +4,8 @@ import classNames from 'classnames';
|
|||
import { INode } from '~/redux/types';
|
||||
import { PRESETS, URLS } from '~/constants/urls';
|
||||
import { RouteComponentProps, withRouter } from 'react-router';
|
||||
import { getURL, stringToColour } from '~/utils/dom';
|
||||
import { getURL } from '~/utils/dom';
|
||||
import { Avatar } from '~/components/common/Avatar';
|
||||
import { normalizeBrightColor } from '~/utils/color';
|
||||
import { adjustHue } from 'color2k';
|
||||
import { useColorGradientFromString } from '~/utils/hooks/useColorGradientFromString';
|
||||
|
||||
type IProps = RouteComponentProps & {
|
||||
|
@ -53,7 +51,7 @@ const NodeRelatedItemUnconnected: FC<IProps> = memo(({ item, history }) => {
|
|||
cb();
|
||||
|
||||
return () => window.removeEventListener('resize', cb);
|
||||
}, [ref.current]);
|
||||
}, []);
|
||||
|
||||
const size = useMemo<CellSize>(() => {
|
||||
if (width > 90) return 'large';
|
||||
|
|
|
@ -9,9 +9,7 @@ import markdown from '~/styles/common/markdown.module.scss';
|
|||
interface IProps extends INodeComponentProps {}
|
||||
|
||||
const NodeTextBlock: FC<IProps> = ({ node }) => {
|
||||
const content = useMemo(() => formatTextParagraphs(path(['blocks', 0, 'text'], node) || ''), [
|
||||
node.blocks,
|
||||
]);
|
||||
const content = useMemo(() => formatTextParagraphs(path(['blocks', 0, 'text'], node) || ''), [node]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue