diff --git a/src/components/common/Anchor/index.tsx b/src/components/common/Anchor/index.tsx index bb84a655..d02abe9b 100644 --- a/src/components/common/Anchor/index.tsx +++ b/src/components/common/Anchor/index.tsx @@ -1,4 +1,4 @@ -import React, { VFC } from 'react'; +import { VFC } from 'react'; import NextLink from 'next/link'; import { Link } from 'react-router-dom'; diff --git a/src/components/common/ArcProgress/index.tsx b/src/components/common/ArcProgress/index.tsx index bc1d4bf5..51bdc35a 100644 --- a/src/components/common/ArcProgress/index.tsx +++ b/src/components/common/ArcProgress/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { describeArc } from '~/utils/dom'; @@ -11,6 +11,14 @@ interface IProps { export const ArcProgress: FC = ({ size, progress = 0 }) => ( - + ); diff --git a/src/components/common/Authorized/index.tsx b/src/components/common/Authorized/index.tsx index d38a9ea6..ba997cef 100644 --- a/src/components/common/Authorized/index.tsx +++ b/src/components/common/Authorized/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { observer } from 'mobx-react-lite'; diff --git a/src/components/common/Avatar/index.tsx b/src/components/common/Avatar/index.tsx index dea2ef51..dc35d469 100644 --- a/src/components/common/Avatar/index.tsx +++ b/src/components/common/Avatar/index.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/BetterScrollDialog/index.tsx b/src/components/common/BetterScrollDialog/index.tsx index cb15f2aa..fe9780e1 100644 --- a/src/components/common/BetterScrollDialog/index.tsx +++ b/src/components/common/BetterScrollDialog/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, MouseEventHandler, useEffect, useRef } from 'react'; +import { FC, MouseEventHandler, ReactChild, useEffect, useRef } from 'react'; import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock'; @@ -8,7 +8,7 @@ import { LoaderCircle } from '~/components/common/LoaderCircle'; import styles from './styles.module.scss'; interface IProps { - children: React.ReactChild; + children: ReactChild; header?: JSX.Element; footer?: JSX.Element; backdrop?: JSX.Element; diff --git a/src/components/common/BlurWrapper/index.tsx b/src/components/common/BlurWrapper/index.tsx index 58f81140..f83ed2c4 100644 --- a/src/components/common/BlurWrapper/index.tsx +++ b/src/components/common/BlurWrapper/index.tsx @@ -1,4 +1,4 @@ -import React, { AllHTMLAttributes, FC } from 'react'; +import { AllHTMLAttributes, FC } from 'react'; import classNames from 'classnames'; @@ -7,5 +7,7 @@ import styles from './styles.module.scss'; type IProps = AllHTMLAttributes & { is_blurred: boolean }; export const BlurWrapper: FC = ({ children, is_blurred }) => ( -
{children}
+
+ {children} +
); diff --git a/src/components/common/Card/index.tsx b/src/components/common/Card/index.tsx index 70576544..8986c6da 100644 --- a/src/components/common/Card/index.tsx +++ b/src/components/common/Card/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/CellGrid/index.tsx b/src/components/common/CellGrid/index.tsx index f0b02046..99fc4c85 100644 --- a/src/components/common/CellGrid/index.tsx +++ b/src/components/common/CellGrid/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, HTMLAttributes } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/Columns/index.tsx b/src/components/common/Columns/index.tsx index d7d164ed..65459c4f 100644 --- a/src/components/common/Columns/index.tsx +++ b/src/components/common/Columns/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useEffect, useRef, useState } from 'react'; +import { FC, useEffect, useRef, useState } from 'react'; import Masonry from 'react-masonry-css'; diff --git a/src/components/common/CoverBackdrop/index.tsx b/src/components/common/CoverBackdrop/index.tsx index f9bc38a6..4cce6607 100644 --- a/src/components/common/CoverBackdrop/index.tsx +++ b/src/components/common/CoverBackdrop/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useCallback, useEffect, useRef, useState } from 'react'; +import { FC, useCallback, useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/DialogTitle/index.tsx b/src/components/common/DialogTitle/index.tsx index abdbc47b..b5de8560 100644 --- a/src/components/common/DialogTitle/index.tsx +++ b/src/components/common/DialogTitle/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactNode } from 'react'; +import { FC, ReactNode } from 'react'; import styles from './styles.module.scss'; @@ -6,6 +6,8 @@ interface IProps { children: ReactNode; } -const DialogTitle: FC = ({ children }) =>

{children}

; +const DialogTitle: FC = ({ children }) => ( +

{children}

+); export { DialogTitle }; diff --git a/src/components/common/DropHereIcon/index.tsx b/src/components/common/DropHereIcon/index.tsx index 0ff4e2d9..ad44361a 100644 --- a/src/components/common/DropHereIcon/index.tsx +++ b/src/components/common/DropHereIcon/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { SVGProps } from '~/utils/types'; diff --git a/src/components/common/Filler/index.tsx b/src/components/common/Filler/index.tsx index a65ec693..2f3c6ac7 100644 --- a/src/components/common/Filler/index.tsx +++ b/src/components/common/Filler/index.tsx @@ -1,10 +1,10 @@ -import React, { FC } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; import styles from './styles.module.scss'; -type IProps = React.HTMLAttributes; +type IProps = HTMLAttributes; export const Filler: FC = ({ className = '', ...props }) => (
diff --git a/src/components/common/Grid/index.tsx b/src/components/common/Grid/index.tsx index bfc83ae2..b8a0ec3f 100644 --- a/src/components/common/Grid/index.tsx +++ b/src/components/common/Grid/index.tsx @@ -1,10 +1,10 @@ -import React, { FC } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; import styles from './styles.module.scss'; -type IProps = React.HTMLAttributes & { +type IProps = HTMLAttributes & { horizontal?: boolean; vertical?: boolean; columns?: string; @@ -41,7 +41,9 @@ const Grid: FC = ({ 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, diff --git a/src/components/common/Group/index.tsx b/src/components/common/Group/index.tsx index 906132ad..2ca88b38 100644 --- a/src/components/common/Group/index.tsx +++ b/src/components/common/Group/index.tsx @@ -1,10 +1,10 @@ -import React, { FC } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; import styles from './styles.module.scss'; -type IProps = React.HTMLAttributes & { +type IProps = HTMLAttributes & { horizontal?: boolean; top?: boolean; bottom?: boolean; @@ -33,7 +33,7 @@ const Group: FC = ({ [styles.wrap]: wrap, [styles.seamless]: seamless, }, - className + className, )} {...props} > diff --git a/src/components/common/Hoverable/index.tsx b/src/components/common/Hoverable/index.tsx index c64c5f3e..6fd25339 100644 --- a/src/components/common/Hoverable/index.tsx +++ b/src/components/common/Hoverable/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactNode } from 'react'; +import { FC, ReactNode } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/Icon/index.tsx b/src/components/common/Icon/index.tsx index 9918e22e..a5fd8efc 100644 --- a/src/components/common/Icon/index.tsx +++ b/src/components/common/Icon/index.tsx @@ -1,15 +1,13 @@ -import React, { FC } from 'react'; +import { FC, SVGAttributes } from 'react'; import { IIcon } from '~/types'; -type IProps = React.SVGAttributes & { +type IProps = SVGAttributes & { size?: number; icon: IIcon; }; -export const Icon: FC = ({ - size = 20, icon, style, ...props -}) => ( +export const Icon: FC = ({ size = 20, icon, style, ...props }) => ( , HTMLImageElement> { + extends DetailedHTMLProps< + ImgHTMLAttributes, + HTMLImageElement + > { onLoad?: () => void; } diff --git a/src/components/common/InfiniteScroll/index.tsx b/src/components/common/InfiniteScroll/index.tsx index ac7024a8..8a5d5062 100644 --- a/src/components/common/InfiniteScroll/index.tsx +++ b/src/components/common/InfiniteScroll/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, HTMLAttributes, useCallback, useEffect, useRef } from 'react'; +import { FC, HTMLAttributes, useCallback, useEffect, useRef } from 'react'; import styles from './styles.module.scss'; @@ -8,7 +8,13 @@ interface IProps extends HTMLAttributes { loadMore: () => void; } -const InfiniteScroll: FC = ({ children, hasMore, scrollReactPx, loadMore, ...props }) => { +const InfiniteScroll: FC = ({ + children, + hasMore, + scrollReactPx, + loadMore, + ...props +}) => { const ref = useRef(null); const onScrollEnd = useCallback( @@ -16,7 +22,7 @@ const InfiniteScroll: FC = ({ children, hasMore, scrollReactPx, loadMore if (!hasMore || !entries[0].isIntersecting) return; loadMore(); }, - [hasMore, loadMore] + [hasMore, loadMore], ); useEffect(() => { diff --git a/src/components/common/InlineUsername/index.tsx b/src/components/common/InlineUsername/index.tsx index 1bfb3124..85a12343 100644 --- a/src/components/common/InlineUsername/index.tsx +++ b/src/components/common/InlineUsername/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { useColorFromString } from '~/hooks/color/useColorFromString'; diff --git a/src/components/common/LoaderCircle/components/LoaderCircleInner/index.tsx b/src/components/common/LoaderCircle/components/LoaderCircleInner/index.tsx index 5658f14c..d7734884 100644 --- a/src/components/common/LoaderCircle/components/LoaderCircleInner/index.tsx +++ b/src/components/common/LoaderCircle/components/LoaderCircleInner/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, SVGAttributes } from 'react'; +import { FC, SVGAttributes } from 'react'; import classNames from 'classnames'; @@ -12,7 +12,12 @@ interface IProps extends SVGAttributes { } const LoaderCircleInner: FC = ({ size, className, ...props }) => ( - + diff --git a/src/components/common/LoaderCircle/index.tsx b/src/components/common/LoaderCircle/index.tsx index c04e112a..d74b9e61 100644 --- a/src/components/common/LoaderCircle/index.tsx +++ b/src/components/common/LoaderCircle/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/LoaderScreen/index.tsx b/src/components/common/LoaderScreen/index.tsx index 0cc3c1da..a6ebccfc 100644 --- a/src/components/common/LoaderScreen/index.tsx +++ b/src/components/common/LoaderScreen/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/LoadingProgress/index.tsx b/src/components/common/LoadingProgress/index.tsx index e5c387b2..dcbd3a39 100644 --- a/src/components/common/LoadingProgress/index.tsx +++ b/src/components/common/LoadingProgress/index.tsx @@ -1,4 +1,4 @@ -import React, { Fragment, VFC } from 'react'; +import { Fragment, VFC } from 'react'; import { useSSRLoadingIndicator } from '~/hooks/dom/useSSRLoadingIndicator'; diff --git a/src/components/common/Markdown/index.tsx b/src/components/common/Markdown/index.tsx index 3d9e349e..1334b288 100644 --- a/src/components/common/Markdown/index.tsx +++ b/src/components/common/Markdown/index.tsx @@ -1,4 +1,4 @@ -import React, { DetailedHTMLProps, VFC, HTMLAttributes } from 'react'; +import { DetailedHTMLProps, VFC, HTMLAttributes } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/ModalWrapper/index.tsx b/src/components/common/ModalWrapper/index.tsx index 577174dd..efef7088 100644 --- a/src/components/common/ModalWrapper/index.tsx +++ b/src/components/common/ModalWrapper/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, MouseEventHandler } from 'react'; +import { FC, MouseEventHandler } from 'react'; import ReactDOM from 'react-dom'; @@ -14,7 +14,7 @@ const ModalWrapper: FC = ({ children, onOverlayClick }) => {
{children}
, - document.body + document.body, ); }; diff --git a/src/components/common/Padder/index.tsx b/src/components/common/Padder/index.tsx index 6247b581..90839804 100644 --- a/src/components/common/Padder/index.tsx +++ b/src/components/common/Padder/index.tsx @@ -1,10 +1,10 @@ -import React, { FC } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; import styles from './styles.module.scss'; -type IProps = React.HTMLAttributes & { +type IProps = HTMLAttributes & { padding?: number; vertical?: boolean; horizontal?: boolean; diff --git a/src/components/common/PageTitle/index.tsx b/src/components/common/PageTitle/index.tsx index 91e5f2da..2227af18 100644 --- a/src/components/common/PageTitle/index.tsx +++ b/src/components/common/PageTitle/index.tsx @@ -1,4 +1,4 @@ -import React, { VFC } from 'react'; +import { VFC } from 'react'; import Head from 'next/head'; diff --git a/src/components/common/Panel/index.tsx b/src/components/common/Panel/index.tsx index 440dc17c..f3176bc1 100644 --- a/src/components/common/Panel/index.tsx +++ b/src/components/common/Panel/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, HTMLAttributes } from 'react'; +import { FC, HTMLAttributes } from 'react'; import classNames from 'classnames'; @@ -9,8 +9,17 @@ type IProps = HTMLAttributes & { stretchy?: boolean; }; -const Panel: FC = ({ className, children, seamless, stretchy, ...props }) => ( -
+const Panel: FC = ({ + className, + children, + seamless, + stretchy, + ...props +}) => ( +
{children}
); diff --git a/src/components/common/Pressable/index.tsx b/src/components/common/Pressable/index.tsx index 86778068..45fb8e3f 100644 --- a/src/components/common/Pressable/index.tsx +++ b/src/components/common/Pressable/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/ScrollHelperBottom/index.tsx b/src/components/common/ScrollHelperBottom/index.tsx index 4febcadf..60f4589d 100644 --- a/src/components/common/ScrollHelperBottom/index.tsx +++ b/src/components/common/ScrollHelperBottom/index.tsx @@ -1,4 +1,4 @@ -import React, { VFC } from 'react'; +import { VFC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/Square/index.tsx b/src/components/common/Square/index.tsx index ff471820..f3ab983a 100644 --- a/src/components/common/Square/index.tsx +++ b/src/components/common/Square/index.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/StatsRow/index.tsx b/src/components/common/StatsRow/index.tsx index 6a6a9b4e..c157a634 100644 --- a/src/components/common/StatsRow/index.tsx +++ b/src/components/common/StatsRow/index.tsx @@ -1,15 +1,24 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { Placeholder } from '~/components/placeholders/Placeholder'; import styles from './styles.module.scss'; -const StatsRow: FC<{ isLoading: boolean; label: string }> = ({ isLoading, label, children }) => ( +const StatsRow: FC<{ isLoading: boolean; label: string }> = ({ + isLoading, + label, + children, +}) => (
  • {isLoading ? ( <> - + ) : ( <> diff --git a/src/components/common/Sticky/index.tsx b/src/components/common/Sticky/index.tsx index bf664518..3fb9628d 100644 --- a/src/components/common/Sticky/index.tsx +++ b/src/components/common/Sticky/index.tsx @@ -1,4 +1,4 @@ -import React, { DetailsHTMLAttributes, FC } from 'react'; +import { DetailsHTMLAttributes, FC } from 'react'; import StickyBox from 'react-sticky-box'; diff --git a/src/components/common/SubTitle/index.tsx b/src/components/common/SubTitle/index.tsx index 7b090b9c..ebfd8961 100644 --- a/src/components/common/SubTitle/index.tsx +++ b/src/components/common/SubTitle/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/common/Superpower/index.tsx b/src/components/common/Superpower/index.tsx index 1ee45c4e..2b78429f 100644 --- a/src/components/common/Superpower/index.tsx +++ b/src/components/common/Superpower/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { observer } from 'mobx-react-lite'; diff --git a/src/components/common/Tabs/index.tsx b/src/components/common/Tabs/index.tsx index ad2772c4..4a9c9e7a 100644 --- a/src/components/common/Tabs/index.tsx +++ b/src/components/common/Tabs/index.tsx @@ -1,4 +1,4 @@ -import React, { createContext, FC, useContext, useMemo, useState, VFC } from 'react'; +import { createContext, FC, useContext, useMemo, useState, VFC } from 'react'; import classNames from 'classnames'; @@ -20,7 +20,9 @@ const HorizontalList: VFC = ({ items }) => {
    {items.map((it, index) => (
    setActiveTab(index)} key={it} > @@ -38,20 +40,27 @@ const Content: FC = ({ children }) => { return [children]; } - return children.filter(it => it); + return children.filter((it) => it); }, [children]); - if (Array.isArray(notEmptyChildren) && notEmptyChildren.length - 1 < activeTab) { + if ( + Array.isArray(notEmptyChildren) && + notEmptyChildren.length - 1 < activeTab + ) { return notEmptyChildren[notEmptyChildren.length - 1]; } return notEmptyChildren[activeTab]; }; -const Tabs = function({ children }) { +const Tabs = function ({ children }) { const [activeTab, setActiveTab] = useState(0); - return {children}; + return ( + + {children} + + ); }; Tabs.Horizontal = HorizontalList; diff --git a/src/components/common/TagField/index.tsx b/src/components/common/TagField/index.tsx index d2bb2144..84d4613b 100644 --- a/src/components/common/TagField/index.tsx +++ b/src/components/common/TagField/index.tsx @@ -1,9 +1,11 @@ -import React, { FC, HTMLAttributes } from 'react'; +import { FC, HTMLAttributes } from 'react'; import styles from './styles.module.scss'; type IProps = HTMLAttributes & {}; -const TagField: FC = ({ children }) =>
    {children}
    ; +const TagField: FC = ({ children }) => ( +
    {children}
    +); export { TagField }; diff --git a/src/components/common/Zone/index.tsx b/src/components/common/Zone/index.tsx index 86c13f71..016c8c45 100644 --- a/src/components/common/Zone/index.tsx +++ b/src/components/common/Zone/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/flow/CellShade/index.tsx b/src/components/flow/CellShade/index.tsx index 758d4097..61b50260 100644 --- a/src/components/flow/CellShade/index.tsx +++ b/src/components/flow/CellShade/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useMemo } from 'react'; +import { FC, useMemo } from 'react'; import classNames from 'classnames'; import { transparentize } from 'color2k'; diff --git a/src/components/flow/FlowCell/index.tsx b/src/components/flow/FlowCell/index.tsx index 608f1e85..cd8b74ba 100644 --- a/src/components/flow/FlowCell/index.tsx +++ b/src/components/flow/FlowCell/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useMemo } from 'react'; +import { FC, useMemo } from 'react'; import classNames from 'classnames'; diff --git a/src/components/flow/FlowCellImage/index.tsx b/src/components/flow/FlowCellImage/index.tsx index f105cade..9b822918 100644 --- a/src/components/flow/FlowCellImage/index.tsx +++ b/src/components/flow/FlowCellImage/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; import Image from 'next/image'; diff --git a/src/components/flow/FlowCellImageLazyLoad/index.tsx b/src/components/flow/FlowCellImageLazyLoad/index.tsx index 2c722210..3b3d8b9a 100644 --- a/src/components/flow/FlowCellImageLazyLoad/index.tsx +++ b/src/components/flow/FlowCellImageLazyLoad/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; import LazyLoad from 'react-lazyload'; diff --git a/src/components/flow/FlowCellMenu/index.tsx b/src/components/flow/FlowCellMenu/index.tsx index 739d531b..b188e600 100644 --- a/src/components/flow/FlowCellMenu/index.tsx +++ b/src/components/flow/FlowCellMenu/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; diff --git a/src/components/flow/FlowCellText/index.tsx b/src/components/flow/FlowCellText/index.tsx index f23fbe90..e49e2822 100644 --- a/src/components/flow/FlowCellText/index.tsx +++ b/src/components/flow/FlowCellText/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactElement } from 'react'; +import { FC, ReactElement } from 'react'; import classNames from 'classnames'; diff --git a/src/components/flow/FlowGrid/index.tsx b/src/components/flow/FlowGrid/index.tsx index 5aac50b5..e5db9697 100644 --- a/src/components/flow/FlowGrid/index.tsx +++ b/src/components/flow/FlowGrid/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, Fragment } from 'react'; +import { FC, Fragment } from 'react'; import classNames from 'classnames'; import { observer } from 'mobx-react-lite'; diff --git a/src/components/flow/FlowRecent/index.tsx b/src/components/flow/FlowRecent/index.tsx index 2539b40d..ca856b62 100644 --- a/src/components/flow/FlowRecent/index.tsx +++ b/src/components/flow/FlowRecent/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { IFlowNode } from '~/types'; @@ -15,11 +15,15 @@ const FlowRecent: FC = ({ recent, updated }) => { return ( <>
    - {updated && updated.map(node => )} + {updated && + updated.map((node) => ( + + ))}
    - {recent && recent.map(node => )} + {recent && + recent.map((node) => )}
    ); diff --git a/src/components/flow/FlowSearchResults/index.tsx b/src/components/flow/FlowSearchResults/index.tsx index c4c539e7..f37325ec 100644 --- a/src/components/flow/FlowSearchResults/index.tsx +++ b/src/components/flow/FlowSearchResults/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import { Icon } from '~/components/common/Icon'; import { InfiniteScroll } from '~/components/common/InfiniteScroll'; diff --git a/src/components/flow/FlowSwiperHero/index.tsx b/src/components/flow/FlowSwiperHero/index.tsx index 3fc07041..f66cfc24 100644 --- a/src/components/flow/FlowSwiperHero/index.tsx +++ b/src/components/flow/FlowSwiperHero/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useCallback, useMemo, useState } from 'react'; +import { FC, useCallback, useMemo, useState } from 'react'; import classNames from 'classnames'; import Image from 'next/future/image'; diff --git a/src/components/input/Button/index.tsx b/src/components/input/Button/index.tsx index 6e65fb6c..b03f3c23 100644 --- a/src/components/input/Button/index.tsx +++ b/src/components/input/Button/index.tsx @@ -1,4 +1,4 @@ -import React, { +import { ButtonHTMLAttributes, DetailedHTMLProps, FC, diff --git a/src/components/input/ButtonGroup/index.tsx b/src/components/input/ButtonGroup/index.tsx index 58330384..d582cad2 100644 --- a/src/components/input/ButtonGroup/index.tsx +++ b/src/components/input/ButtonGroup/index.tsx @@ -1,4 +1,4 @@ -import React, { HTMLAttributes } from 'react'; +import { HTMLAttributes } from 'react'; import classNames from 'classnames'; diff --git a/src/components/input/InputRow/index.tsx b/src/components/input/InputRow/index.tsx index 9fb25231..244adb27 100644 --- a/src/components/input/InputRow/index.tsx +++ b/src/components/input/InputRow/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, ReactNode } from 'react'; +import { FC, ReactNode } from 'react'; import classNames from 'classnames'; diff --git a/src/components/input/InputText/index.tsx b/src/components/input/InputText/index.tsx index b69f02c7..3c96a720 100644 --- a/src/components/input/InputText/index.tsx +++ b/src/components/input/InputText/index.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEvent, DetailedHTMLProps, FC, diff --git a/src/components/input/InputWrapper/index.tsx b/src/components/input/InputWrapper/index.tsx index fcf912e8..4e3733f3 100644 --- a/src/components/input/InputWrapper/index.tsx +++ b/src/components/input/InputWrapper/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; @@ -11,7 +11,13 @@ interface InputWrapperProps { notEmpty: boolean; } -const InputWrapper: FC = ({ children, notEmpty, title, focused, error }) => ( +const InputWrapper: FC = ({ + children, + notEmpty, + title, + focused, + error, +}) => (
    = ({ isLoading, onClick }) => ( - ); -export { LoadMoreButton } +export { LoadMoreButton }; diff --git a/src/components/input/SearchInput/index.tsx b/src/components/input/SearchInput/index.tsx index 6a3fc4e5..f922b0f3 100644 --- a/src/components/input/SearchInput/index.tsx +++ b/src/components/input/SearchInput/index.tsx @@ -1,4 +1,4 @@ -import React, { VFC } from 'react'; +import { VFC } from 'react'; import { Icon } from '~/components/common/Icon'; import { InputText, InputTextProps } from '~/components/input/InputText'; diff --git a/src/components/input/Textarea/index.tsx b/src/components/input/Textarea/index.tsx index 4e2ab9fa..aeb59504 100644 --- a/src/components/input/Textarea/index.tsx +++ b/src/components/input/Textarea/index.tsx @@ -1,11 +1,11 @@ -import React, { +import { ChangeEvent, DetailedHTMLProps, forwardRef, TextareaHTMLAttributes, useCallback, useEffect, - useState + useState, } from 'react'; import autosize from 'autosize'; @@ -42,14 +42,14 @@ const Textarea = forwardRef( value, ...props }, - forwardRef + forwardRef, ) => { const ref = useForwardRef(forwardRef); const [focused, setFocused] = useState(false); const onInput = useCallback( ({ target }: ChangeEvent) => handler(target.value), - [handler] + [handler], ); const onFocus = useCallback(() => setFocused(true), [setFocused]); @@ -68,7 +68,12 @@ const Textarea = forwardRef( }, [ref, value, forwardRef]); return ( - +