mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
(nextjs) fixed eslint warnings
This commit is contained in:
parent
c469722a86
commit
e5f8d5a551
29 changed files with 56 additions and 59 deletions
|
@ -1,9 +1,4 @@
|
|||
import React, {
|
||||
forwardRef,
|
||||
KeyboardEventHandler,
|
||||
TextareaHTMLAttributes,
|
||||
useCallback,
|
||||
} from 'react';
|
||||
import React, { forwardRef, KeyboardEventHandler, TextareaHTMLAttributes, useCallback } from 'react';
|
||||
import { Textarea } from '~/components/input/Textarea';
|
||||
import { useCommentFormContext } from '~/hooks/comments/useCommentFormFormik';
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
|
|
|
@ -6,10 +6,10 @@ import { Link } from 'react-router-dom';
|
|||
|
||||
interface AnchorProps extends LinkProps {}
|
||||
|
||||
const Anchor: VFC<AnchorProps> = ({ ref, href, ...rest }) =>
|
||||
const Anchor: VFC<AnchorProps> = ({ ref, href, children, ...rest }) =>
|
||||
CONFIG.isNextEnvironment ? (
|
||||
<NextLink href={href ?? ''} passHref>
|
||||
<a {...rest} />
|
||||
<a {...rest}>{children}</a>
|
||||
</NextLink>
|
||||
) : (
|
||||
<Link {...rest} to={href ?? ''} />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, forwardRef, useCallback } from 'react';
|
||||
import React, { forwardRef, useCallback } from 'react';
|
||||
import { getURLFromString } from '~/utils/dom';
|
||||
import { PRESETS } from '~/constants/urls';
|
||||
import styles from './styles.module.scss';
|
||||
|
|
|
@ -32,20 +32,18 @@ const Grid: FC<IProps> = ({
|
|||
[styles.horizontal]: horizontal,
|
||||
[styles.vertical]: !horizontal,
|
||||
[styles.square]: square,
|
||||
[styles.stretchy]: stretchy
|
||||
[styles.stretchy]: stretchy,
|
||||
})}
|
||||
style={{
|
||||
...style,
|
||||
gridTemplateColumns: square
|
||||
? `repeat(auto-fill, ${(columns !== 'auto' && columns) || size})`
|
||||
: columns,
|
||||
gridTemplateRows: square
|
||||
? `repeat(auto-fill, ${(rows !== 'auto' && rows) || size})`
|
||||
: rows,
|
||||
gridTemplateRows: square ? `repeat(auto-fill, ${(rows !== 'auto' && rows) || size})` : rows,
|
||||
gridAutoRows: rows,
|
||||
gridAutoColumns: columns,
|
||||
gridRowGap: gap,
|
||||
gridColumnGap: gap
|
||||
gridColumnGap: gap,
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
|
|
|
@ -31,7 +31,7 @@ const Group: FC<IProps> = ({
|
|||
[styles.wrap]: wrap,
|
||||
[styles.seamless]: seamless,
|
||||
},
|
||||
className,
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
|
|
|
@ -6,15 +6,9 @@ import classNames from 'classnames';
|
|||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
seamless?: boolean;
|
||||
stretchy?: boolean;
|
||||
}
|
||||
};
|
||||
|
||||
const Panel: FC<IProps> = ({
|
||||
className,
|
||||
children,
|
||||
seamless,
|
||||
stretchy,
|
||||
...props
|
||||
}) => (
|
||||
const Panel: FC<IProps> = ({ className, children, seamless, stretchy, ...props }) => (
|
||||
<div className={classNames(styles.panel, className, { seamless, stretchy })} {...props}>
|
||||
{children}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React, { FC } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { CellShade } from '~/components/flow/CellShade';
|
||||
import { FlowDisplay, INode } from '~/types';
|
||||
import { FlowCellText } from '~/components/flow/FlowCellText';
|
||||
|
|
|
@ -8,7 +8,6 @@ import { getURLFromString } from '~/utils/dom';
|
|||
import { PRESETS, URLS } from '~/constants/urls';
|
||||
import SwiperClass from 'swiper/types/swiper-class';
|
||||
import { LoaderCircle } from '~/components/input/LoaderCircle';
|
||||
import { useHistory } from 'react-router';
|
||||
import classNames from 'classnames';
|
||||
import { IFlowNode } from '~/types';
|
||||
import { useWindowSize } from '~/hooks/dom/useWindowSize';
|
||||
|
|
|
@ -7,7 +7,6 @@ import { INode } from '~/types';
|
|||
import { Icon } from '~/components/input/Icon';
|
||||
import classNames from 'classnames';
|
||||
import { Grid } from '~/components/containers/Grid';
|
||||
import { useHistory } from 'react-router';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||
import { useNavigation } from '~/hooks/navigation/useNavigation';
|
||||
|
|
|
@ -6,7 +6,6 @@ import styles from './styles.module.scss';
|
|||
import { INode } from '~/types';
|
||||
import { getPrettyDate } from '~/utils/dom';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useNavigation } from '~/hooks/navigation/useNavigation';
|
||||
|
||||
interface IProps {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import React, { FC, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import React, { FC, memo, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import classNames from 'classnames';
|
||||
import { INode } from '~/types';
|
||||
import { PRESETS, URLS } from '~/constants/urls';
|
||||
import { RouteComponentProps } from 'react-router';
|
||||
import { PRESETS } from '~/constants/urls';
|
||||
import { getURL, getURLFromString } from '~/utils/dom';
|
||||
import { useColorGradientFromString } from '~/hooks/color/useColorGradientFromString';
|
||||
import { Square } from '~/components/common/Square';
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import React, { FC, useMemo } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { Button } from '~/components/input/Button';
|
||||
import { Filler } from '~/components/containers/Filler';
|
||||
|
||||
interface SidebarStackProps {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue