From 2514e7b074d349ab1af62dd2044e797c89b631a8 Mon Sep 17 00:00:00 2001 From: Liana Date: Thu, 6 Jun 2024 00:37:27 +0300 Subject: [PATCH] lint fix --- .../AlgorithmFormConfigurator/FormFooter.tsx | 4 +-- .../src/components/Chart/ChartControls.tsx | 2 +- .../ClusterOptions/ClusterOptions.tsx | 4 +-- .../src/components/Collapse/Collapse.tsx | 2 +- .../components/DatasetCard/DatasetCard.tsx | 18 ++++++------ .../DatasetUploader/DatasetUploader.tsx | 6 ++-- .../DependencyList/DependencyList.tsx | 6 ++-- .../DownloadResult/DownloadResult.tsx | 2 +- .../components/ExternalLink/ExternalLink.tsx | 2 +- .../FilePropertiesModal.tsx | 1 - .../src/components/FileStats/Alert/Alert.tsx | 4 +-- .../FileStats/ColumnCard/ColumnCard.tsx | 6 ++-- .../FileStats/ModeButton/ModeButton.tsx | 4 +-- .../client/src/components/Header/Header.tsx | 6 ++-- web-app/client/src/components/Icon/Icon.tsx | 2 +- web-app/client/src/components/Icon/index.ts | 2 +- .../Inputs/MultiSelect/MultiSelect.tsx | 2 +- .../Inputs/MultiSelect/customComponents.tsx | 8 +++--- .../src/components/Inputs/Select/Select.tsx | 4 +-- .../Inputs/Select/customComponents.tsx | 6 ++-- .../client/src/components/Layout/Layout.tsx | 3 +- .../ListPropertiesModal.tsx | 8 +----- .../client/src/components/Loader/Loader.tsx | 6 ++-- .../src/components/LogInModal/LogInModal.tsx | 2 +- .../src/components/LogInModal/steps/LogIn.tsx | 1 - .../components/LogInModal/steps/Password.tsx | 2 +- .../components/MobileBanner/MobileBanner.tsx | 2 +- .../ModalContainer/ModalContainer.tsx | 6 ++-- .../client/src/components/NavBar/NavBar.tsx | 3 +- .../src/components/Pagination/Pagination.tsx | 4 +-- .../PrimitiveDescription.tsx | 4 +-- .../ReportsLayout/ReportsLayout.tsx | 4 +-- .../implementations/MFDTable.tsx | 2 +- .../components/SignUpModal/SignUpModal.tsx | 7 ++--- .../TeamMemberBadge/TeamMemberBadge.tsx | 3 +- .../src/components/Toast/ToastContainer.tsx | 2 +- .../client/src/components/Tooltip/Tooltip.tsx | 8 +++--- .../components/WizardLayout/WizardLayout.tsx | 2 +- web-app/client/src/constants/portalRoot.ts | 5 +++- web-app/client/src/pages/404.tsx | 4 +-- web-app/client/src/pages/_app.tsx | 1 - web-app/client/src/pages/_document.tsx | 5 ++-- .../src/pages/create-task/choose-file.tsx | 8 +++--- .../pages/create-task/choose-primitive.tsx | 2 +- web-app/client/src/pages/index.tsx | 4 +-- web-app/client/src/pages/papers.tsx | 3 +- web-app/client/src/pages/reports/clusters.tsx | 2 +- .../client/src/pages/reports/dependencies.tsx | 8 ++---- .../src/pages/reports/metric-dependencies.tsx | 28 +++++++++---------- web-app/client/src/pages/team.tsx | 2 +- 50 files changed, 110 insertions(+), 122 deletions(-) diff --git a/web-app/client/src/components/AlgorithmFormConfigurator/FormFooter.tsx b/web-app/client/src/components/AlgorithmFormConfigurator/FormFooter.tsx index e1ccae1f8..8bfe76782 100644 --- a/web-app/client/src/components/AlgorithmFormConfigurator/FormFooter.tsx +++ b/web-app/client/src/components/AlgorithmFormConfigurator/FormFooter.tsx @@ -1,7 +1,7 @@ -import Button from '@components/Button'; -import Icon from '@components/Icon'; import { NextRouter } from 'next/router'; import React from 'react'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; const FormFooter = (router: NextRouter, onSubmit: () => Promise) => ( <> diff --git a/web-app/client/src/components/Chart/ChartControls.tsx b/web-app/client/src/components/Chart/ChartControls.tsx index 28114dcd9..504646179 100644 --- a/web-app/client/src/components/Chart/ChartControls.tsx +++ b/web-app/client/src/components/Chart/ChartControls.tsx @@ -1,7 +1,7 @@ +import { FC } from 'react'; import Button from '@components/Button'; import Icon from '@components/Icon'; import { Text } from '@components/Inputs'; -import { FC } from 'react'; import styles from './ChartControls.module.scss'; type Props = { diff --git a/web-app/client/src/components/ClusterOptions/ClusterOptions.tsx b/web-app/client/src/components/ClusterOptions/ClusterOptions.tsx index b7c9436ef..7ca0f799e 100644 --- a/web-app/client/src/components/ClusterOptions/ClusterOptions.tsx +++ b/web-app/client/src/components/ClusterOptions/ClusterOptions.tsx @@ -1,8 +1,8 @@ +import cn from 'classnames'; +import { Dispatch, FC, SetStateAction, useState } from 'react'; import Button from '@components/Button'; import Icon from '@components/Icon'; import { Checkbox } from '@components/Inputs'; -import cn from 'classnames'; -import { Dispatch, FC, SetStateAction, useState } from 'react'; import styles from './ClusterOptions.module.scss'; interface Props { diff --git a/web-app/client/src/components/Collapse/Collapse.tsx b/web-app/client/src/components/Collapse/Collapse.tsx index 9f7011ab5..6bcbbe62d 100644 --- a/web-app/client/src/components/Collapse/Collapse.tsx +++ b/web-app/client/src/components/Collapse/Collapse.tsx @@ -1,6 +1,6 @@ -import Icon from '@components/Icon'; import cn from 'classnames'; import { useState } from 'react'; +import Icon from '@components/Icon'; import { FCWithChildren } from 'types/react'; import styles from './Collapse.module.scss'; diff --git a/web-app/client/src/components/DatasetCard/DatasetCard.tsx b/web-app/client/src/components/DatasetCard/DatasetCard.tsx index 53a57f933..9affe2f6e 100644 --- a/web-app/client/src/components/DatasetCard/DatasetCard.tsx +++ b/web-app/client/src/components/DatasetCard/DatasetCard.tsx @@ -1,13 +1,14 @@ -import Icon from '@components/Icon'; -import { useTaskUrlParams } from '@hooks/useTaskUrlParams'; import classNames from 'classnames'; import { formatDistance } from 'date-fns'; import { FC, PropsWithChildren, useState } from 'react'; +import FilePropertiesModal from '@components/FilePropertiesModal'; +import Icon from '@components/Icon'; +import { useTaskUrlParams } from '@hooks/useTaskUrlParams'; import '@formatjs/intl-numberformat/polyfill'; import '@formatjs/intl-numberformat/locale-data/en'; import { AllowedDataset } from 'types/algorithms'; import styles from './DatasetCard.module.scss'; -import FilePropertiesModal from '@components/FilePropertiesModal'; + interface BaseCardProps extends PropsWithChildren { isSelected?: boolean; isDisabled?: boolean; @@ -75,12 +76,13 @@ export const DatasetCard: FC = ({ file }) => { >

{fileName}

- setIsOpen(true)} + setIsOpen(true)} /> + setIsOpen(false)} + fileID={file.fileID} + data={file} /> - setIsOpen(false)} fileID={file.fileID} data={file} />
{descriptionList.join('\n')} diff --git a/web-app/client/src/components/DatasetUploader/DatasetUploader.tsx b/web-app/client/src/components/DatasetUploader/DatasetUploader.tsx index d33222c28..656c54cdc 100644 --- a/web-app/client/src/components/DatasetUploader/DatasetUploader.tsx +++ b/web-app/client/src/components/DatasetUploader/DatasetUploader.tsx @@ -1,5 +1,8 @@ import { DefaultContext, useMutation, useQuery } from '@apollo/client'; +import classNames from 'classnames'; +import { FC, useCallback, useEffect, useRef, useState } from 'react'; import cardStyles from '@components/DatasetCard/DatasetCard.module.scss'; +import FilePropertiesModal from '@components/FilePropertiesModal'; import Icon from '@components/Icon'; import ProgressBar, { Progress } from '@components/ProgressBar/ProgressBar'; import { @@ -9,11 +12,8 @@ import { import { UPLOAD_DATASET } from '@graphql/operations/mutations/uploadDataset'; import { getAlgorithmsConfig } from '@graphql/operations/queries/__generated__/getAlgorithmsConfig'; import { GET_ALGORITHMS_CONFIG } from '@graphql/operations/queries/getAlgorithmsConfig'; -import classNames from 'classnames'; -import { FC, useCallback, useEffect, useRef, useState } from 'react'; import { AllowedDataset } from 'types/algorithms'; import styles from './DatasetUploader.module.scss'; -import FilePropertiesModal from '@components/FilePropertiesModal'; type Props = { onUpload: (file: AllowedDataset) => void; diff --git a/web-app/client/src/components/DependencyList/DependencyList.tsx b/web-app/client/src/components/DependencyList/DependencyList.tsx index 2c3c11117..dbf2f3441 100644 --- a/web-app/client/src/components/DependencyList/DependencyList.tsx +++ b/web-app/client/src/components/DependencyList/DependencyList.tsx @@ -1,9 +1,9 @@ -import Icon from '@components/Icon'; -import { useTaskContext } from '@components/TaskContext'; -import { GeneralColumn } from '@utils/convertDependencies'; import classNames from 'classnames'; import _ from 'lodash'; import { FC, ReactElement } from 'react'; +import Icon from '@components/Icon'; +import { useTaskContext } from '@components/TaskContext'; +import { GeneralColumn } from '@utils/convertDependencies'; import styles from './DependencyList.module.scss'; type Props = { diff --git a/web-app/client/src/components/DownloadResult/DownloadResult.tsx b/web-app/client/src/components/DownloadResult/DownloadResult.tsx index d766a9be7..29dbf4318 100644 --- a/web-app/client/src/components/DownloadResult/DownloadResult.tsx +++ b/web-app/client/src/components/DownloadResult/DownloadResult.tsx @@ -1,4 +1,5 @@ import { useMutation } from '@apollo/client'; +import { FC } from 'react'; import Button from '@components/Button'; import Icon from '@components/Icon'; import { useTaskContext } from '@components/TaskContext'; @@ -7,7 +8,6 @@ import { downloadResultsVariables, } from '@graphql/operations/mutations/__generated__/downloadResults'; import { DOWNLOAD_RESULTS } from '@graphql/operations/mutations/downloadResults'; -import { FC } from 'react'; import { FileExtension, IntersectionFilter } from 'types/globalTypes'; interface Props { diff --git a/web-app/client/src/components/ExternalLink/ExternalLink.tsx b/web-app/client/src/components/ExternalLink/ExternalLink.tsx index 9a88b0762..2255f2183 100644 --- a/web-app/client/src/components/ExternalLink/ExternalLink.tsx +++ b/web-app/client/src/components/ExternalLink/ExternalLink.tsx @@ -1,6 +1,6 @@ -import Icon from '@components/Icon'; import cn from 'classnames'; import { FC, HTMLProps } from 'react'; +import Icon from '@components/Icon'; import styles from './ExternalLink.module.scss'; const ExternalLink: FC> = ({ diff --git a/web-app/client/src/components/FilePropertiesModal/FilePropertiesModal.tsx b/web-app/client/src/components/FilePropertiesModal/FilePropertiesModal.tsx index caf53db27..54313ba34 100644 --- a/web-app/client/src/components/FilePropertiesModal/FilePropertiesModal.tsx +++ b/web-app/client/src/components/FilePropertiesModal/FilePropertiesModal.tsx @@ -22,7 +22,6 @@ type Props = ModalProps & ); const FilePropertiesModal: FC = ({ isOpen, onClose, ...props }) => { - return (

File Properties

diff --git a/web-app/client/src/components/FileStats/Alert/Alert.tsx b/web-app/client/src/components/FileStats/Alert/Alert.tsx index 721451824..bf5fb93f8 100644 --- a/web-app/client/src/components/FileStats/Alert/Alert.tsx +++ b/web-app/client/src/components/FileStats/Alert/Alert.tsx @@ -1,7 +1,7 @@ -import Icon from '@components/Icon'; -import colors from '@constants/colors'; import classNames from 'classnames'; import { FC, HTMLProps, ReactNode } from 'react'; +import Icon from '@components/Icon'; +import colors from '@constants/colors'; import styles from './Alert.module.scss'; type AlertVariant = 'info' | 'error' | 'success' | 'warning'; diff --git a/web-app/client/src/components/FileStats/ColumnCard/ColumnCard.tsx b/web-app/client/src/components/FileStats/ColumnCard/ColumnCard.tsx index e18de0b56..ceb6f23cb 100644 --- a/web-app/client/src/components/FileStats/ColumnCard/ColumnCard.tsx +++ b/web-app/client/src/components/FileStats/ColumnCard/ColumnCard.tsx @@ -1,3 +1,6 @@ +import classNames from 'classnames'; +import { FC, HTMLProps } from 'react'; +import { Collapse } from 'react-collapse'; import Button from '@components/Button'; import { Badge } from '@components/FileStats/Badge'; import { useToggle } from '@components/FileStats/hooks'; @@ -6,9 +9,6 @@ import { Paper } from '@components/FileStats/Paper'; import { StatsBlock } from '@components/FileStats/StatsBlock'; import Icon from '@components/Icon'; import { getFileStats_datasetInfo_statsInfo_stats as ColumnStats } from '@graphql/operations/queries/__generated__/getFileStats'; -import classNames from 'classnames'; -import { FC, HTMLProps } from 'react'; -import { Collapse } from 'react-collapse'; import styles from './ColumnCard.module.scss'; type ColumnCardProps = { diff --git a/web-app/client/src/components/FileStats/ModeButton/ModeButton.tsx b/web-app/client/src/components/FileStats/ModeButton/ModeButton.tsx index 840ecbf9d..5de5f9d75 100644 --- a/web-app/client/src/components/FileStats/ModeButton/ModeButton.tsx +++ b/web-app/client/src/components/FileStats/ModeButton/ModeButton.tsx @@ -1,7 +1,7 @@ -import Button from '@components/Button'; -import Icon from '@components/Icon'; import classNames from 'classnames'; import { ButtonHTMLAttributes, FC } from 'react'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; import styles from './ModeButton.module.scss'; type ModeButtonProps = ButtonHTMLAttributes & { diff --git a/web-app/client/src/components/Header/Header.tsx b/web-app/client/src/components/Header/Header.tsx index 67f0b9854..147509da0 100644 --- a/web-app/client/src/components/Header/Header.tsx +++ b/web-app/client/src/components/Header/Header.tsx @@ -1,13 +1,13 @@ +import classNames from 'classnames'; +import Link from 'next/link'; +import { useEffect, useState } from 'react'; import Button from '@components/Button'; import Icon from '@components/Icon'; import LogInModal from '@components/LogInModal'; import NavBar from '@components/NavBar'; import SignUpModal from '@components/SignUpModal'; import { useAuthContext } from '@hooks/useAuthContext'; -import classNames from 'classnames'; -import { useEffect, useState } from 'react'; import styles from './Header.module.scss'; -import Link from 'next/link'; const Header = () => { const { user, signOut } = useAuthContext(); diff --git a/web-app/client/src/components/Icon/Icon.tsx b/web-app/client/src/components/Icon/Icon.tsx index 56802f7fd..c48a1170a 100644 --- a/web-app/client/src/components/Icon/Icon.tsx +++ b/web-app/client/src/components/Icon/Icon.tsx @@ -13,4 +13,4 @@ const Icon = ( return icons[props.name](props); }; -export default Icon; \ No newline at end of file +export default Icon; diff --git a/web-app/client/src/components/Icon/index.ts b/web-app/client/src/components/Icon/index.ts index 10473b0f8..0295a6780 100644 --- a/web-app/client/src/components/Icon/index.ts +++ b/web-app/client/src/components/Icon/index.ts @@ -1,2 +1,2 @@ export { default } from './Icon'; -export type { IconName } from './Icon'; \ No newline at end of file +export type { IconName } from './Icon'; diff --git a/web-app/client/src/components/Inputs/MultiSelect/MultiSelect.tsx b/web-app/client/src/components/Inputs/MultiSelect/MultiSelect.tsx index 6a22914c2..00254817a 100644 --- a/web-app/client/src/components/Inputs/MultiSelect/MultiSelect.tsx +++ b/web-app/client/src/components/Inputs/MultiSelect/MultiSelect.tsx @@ -8,10 +8,10 @@ import { import ReactSelect, { Props as ReactSelectProps } from 'react-select'; import { InputPropsBase } from '@components/Inputs'; import Tooltip from '@components/Tooltip'; +import { portalRoot } from '@constants/portalRoot'; import { Option } from 'types/inputs'; import customComponents, { colorStyles } from './customComponents'; import styles from './MultiSelect.module.scss'; -import { portalRoot } from '@constants/portalRoot'; export type MultiSelectProps = InputPropsBase & ReactSelectProps, true> & { diff --git a/web-app/client/src/components/Inputs/MultiSelect/customComponents.tsx b/web-app/client/src/components/Inputs/MultiSelect/customComponents.tsx index f10708544..84edec510 100644 --- a/web-app/client/src/components/Inputs/MultiSelect/customComponents.tsx +++ b/web-app/client/src/components/Inputs/MultiSelect/customComponents.tsx @@ -1,6 +1,3 @@ -import Icon from '@components/Icon'; -import { InputPropsBase } from '@components/Inputs'; -import badgeStyles from '@components/Inputs/MultiSelect/OptionBadge/OptionBadge.module.scss'; import cn from 'classnames'; import { ComponentType } from 'react'; import { @@ -18,10 +15,13 @@ import { OptionProps, NoticeProps, } from 'react-select'; +import Icon from '@components/Icon'; +import { InputPropsBase } from '@components/Inputs'; +import badgeStyles from '@components/Inputs/MultiSelect/OptionBadge/OptionBadge.module.scss'; +import { Option as OptionType } from 'types/inputs'; import { OptionWithBadges } from 'types/multiSelect'; import { OptionBadge } from './OptionBadge'; import styles from './MultiSelect.module.scss'; -import { Option as OptionType } from 'types/inputs'; export const colorStyles: StylesConfig = { control: () => ({}), diff --git a/web-app/client/src/components/Inputs/Select/Select.tsx b/web-app/client/src/components/Inputs/Select/Select.tsx index 645b7b6b3..543600d7f 100644 --- a/web-app/client/src/components/Inputs/Select/Select.tsx +++ b/web-app/client/src/components/Inputs/Select/Select.tsx @@ -8,10 +8,10 @@ import { import ReactSelect, { Props as ReactSelectProps } from 'react-select'; import { InputPropsBase } from '@components/Inputs'; import Tooltip from '@components/Tooltip'; +import { portalRoot } from '@constants/portalRoot'; import { Option } from 'types/inputs'; import customComponents from './customComponents'; import styles from './Select.module.scss'; -import { portalRoot } from '@constants/portalRoot'; export type Props = InputPropsBase & ReactSelectProps, false> & { @@ -49,7 +49,7 @@ const Select: ForwardRefRenderFunction = ( ref={ref} styles={{ menuPortal: (base) => { - return { ...base}; + return { ...base }; }, }} menuPortalTarget={portalRoot} diff --git a/web-app/client/src/components/Inputs/Select/customComponents.tsx b/web-app/client/src/components/Inputs/Select/customComponents.tsx index 36e818544..c41e8d0b2 100644 --- a/web-app/client/src/components/Inputs/Select/customComponents.tsx +++ b/web-app/client/src/components/Inputs/Select/customComponents.tsx @@ -1,5 +1,3 @@ -import Icon from '@components/Icon'; -import { InputPropsBase } from '@components/Inputs'; import cn from 'classnames'; import { ComponentType } from 'react'; import { @@ -12,11 +10,11 @@ import { SingleValueProps, ValueContainerProps, NoticeProps, - MenuProps, } from 'react-select'; +import Icon from '@components/Icon'; +import { InputPropsBase } from '@components/Inputs'; import { Option as OptionType } from 'types/inputs'; import styles from './Select.module.scss'; -import { FloatingPortal } from '@floating-ui/react'; const Control: ComponentType< ControlProps & InputPropsBase diff --git a/web-app/client/src/components/Layout/Layout.tsx b/web-app/client/src/components/Layout/Layout.tsx index 010971e43..7d2c5048d 100644 --- a/web-app/client/src/components/Layout/Layout.tsx +++ b/web-app/client/src/components/Layout/Layout.tsx @@ -1,6 +1,6 @@ -import Header from '@components/Header'; import dynamic from 'next/dynamic'; import { NextSeo } from 'next-seo'; +import Header from '@components/Header'; import { FCWithChildren } from 'types/react'; import styles from './Layout.module.scss'; @@ -9,7 +9,6 @@ const MobileBanner = dynamic(() => import('@components/MobileBanner'), { }); const Layout: FCWithChildren = ({ children }) => { - return ( <> = ({ isOpen, - setIsOpen, name, onClose, onApply, children, }) => { return ( - +

{name}

{children}
diff --git a/web-app/client/src/components/Loader/Loader.tsx b/web-app/client/src/components/Loader/Loader.tsx index aafb05db4..5ad38fa74 100644 --- a/web-app/client/src/components/Loader/Loader.tsx +++ b/web-app/client/src/components/Loader/Loader.tsx @@ -1,10 +1,10 @@ +import cn from 'classnames'; +import { useRouter } from 'next/router'; +import { FC, useEffect } from 'react'; import Icon, { IconName } from '@components/Icon'; import { primitivePathnames } from '@constants/primitiveReportPathnames'; import useTaskState from '@hooks/useTaskState'; import getTaskStatusData from '@utils/getTaskStatusData'; -import cn from 'classnames'; -import { useRouter } from 'next/router'; -import { FC, useEffect } from 'react'; import { PrimitiveType } from 'types/globalTypes'; import styles from './Loader.module.scss'; diff --git a/web-app/client/src/components/LogInModal/LogInModal.tsx b/web-app/client/src/components/LogInModal/LogInModal.tsx index 49b3065ae..30c546556 100644 --- a/web-app/client/src/components/LogInModal/LogInModal.tsx +++ b/web-app/client/src/components/LogInModal/LogInModal.tsx @@ -1,10 +1,10 @@ import { FC, useEffect, useState } from 'react'; +import AuthSuccessModal from '@components/AuthSuccessModal'; import ModalContainer, { ModalProps } from '../ModalContainer'; import Code from './steps/Code'; import Email from './steps/Email'; import LogIn from './steps/LogIn'; import Password from './steps/Password'; -import AuthSuccessModal from '@components/AuthSuccessModal'; const LogInModal: FC = ({ isOpen, onClose }) => { const [stage, setStage] = useState(1); diff --git a/web-app/client/src/components/LogInModal/steps/LogIn.tsx b/web-app/client/src/components/LogInModal/steps/LogIn.tsx index 32e0b2ca3..e52699d24 100644 --- a/web-app/client/src/components/LogInModal/steps/LogIn.tsx +++ b/web-app/client/src/components/LogInModal/steps/LogIn.tsx @@ -2,7 +2,6 @@ import { useMutation } from '@apollo/client'; import { FC } from 'react'; import { useForm } from 'react-hook-form'; import isEmail from 'validator/lib/isEmail'; -import isStrongPassword from 'validator/lib/isStrongPassword'; import Button from '@components/Button'; import { Text } from '@components/Inputs'; import { diff --git a/web-app/client/src/components/LogInModal/steps/Password.tsx b/web-app/client/src/components/LogInModal/steps/Password.tsx index 587428378..113f3e309 100644 --- a/web-app/client/src/components/LogInModal/steps/Password.tsx +++ b/web-app/client/src/components/LogInModal/steps/Password.tsx @@ -4,6 +4,7 @@ import { useForm } from 'react-hook-form'; import isStrongPassword from 'validator/lib/isStrongPassword'; import Button from '@components/Button'; import { Text } from '@components/Inputs'; +import { passwordTooltip } from '@components/SignUpModal/steps/CoreInfo'; import { changePassword, changePasswordVariables, @@ -12,7 +13,6 @@ import { CHANGE_PASSWORD } from '@graphql/operations/mutations/changePassword'; import { useAuthContext } from '@hooks/useAuthContext'; import hashPassword from '@utils/hashPassword'; import styles from '../LogInModal.module.scss'; -import { passwordTooltip } from '@components/SignUpModal/steps/CoreInfo'; type Inputs = { password: string; diff --git a/web-app/client/src/components/MobileBanner/MobileBanner.tsx b/web-app/client/src/components/MobileBanner/MobileBanner.tsx index 10cfac9e2..a57c84bd1 100644 --- a/web-app/client/src/components/MobileBanner/MobileBanner.tsx +++ b/web-app/client/src/components/MobileBanner/MobileBanner.tsx @@ -1,5 +1,5 @@ -import Icon from '@components/Icon'; import { FC, useLayoutEffect, useReducer, useRef } from 'react'; +import Icon from '@components/Icon'; import styles from './MobileBanner.module.scss'; const isMobile = () => diff --git a/web-app/client/src/components/ModalContainer/ModalContainer.tsx b/web-app/client/src/components/ModalContainer/ModalContainer.tsx index 26d1d0155..0eec6cfbf 100644 --- a/web-app/client/src/components/ModalContainer/ModalContainer.tsx +++ b/web-app/client/src/components/ModalContainer/ModalContainer.tsx @@ -1,4 +1,3 @@ -import Icon from '@components/Icon'; import { useFloating, FloatingPortal, @@ -9,10 +8,11 @@ import { useInteractions, useRole, } from '@floating-ui/react'; -import { FCWithChildren } from 'types/react'; -import styles from './ModalContainer.module.scss'; import cn from 'classnames'; +import Icon from '@components/Icon'; import { portalRoot } from '@constants/portalRoot'; +import { FCWithChildren } from 'types/react'; +import styles from './ModalContainer.module.scss'; export interface ModalProps { onClose: () => void; diff --git a/web-app/client/src/components/NavBar/NavBar.tsx b/web-app/client/src/components/NavBar/NavBar.tsx index fd4fb9e81..8a0433bd6 100644 --- a/web-app/client/src/components/NavBar/NavBar.tsx +++ b/web-app/client/src/components/NavBar/NavBar.tsx @@ -1,10 +1,9 @@ -import Icon from '@components/Icon'; import cn from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { FC, useRef } from 'react'; +import Icon from '@components/Icon'; import { useAuthContext } from '@hooks/useAuthContext'; -import logo from '@public/logo.svg'; import { User } from 'types/auth'; import styles from './NavBar.module.scss'; diff --git a/web-app/client/src/components/Pagination/Pagination.tsx b/web-app/client/src/components/Pagination/Pagination.tsx index 1e7b1949e..d5bda56cc 100644 --- a/web-app/client/src/components/Pagination/Pagination.tsx +++ b/web-app/client/src/components/Pagination/Pagination.tsx @@ -1,8 +1,8 @@ -import Icon from '@components/Icon'; -import colors from '@constants/colors'; import * as React from 'react'; import { FC } from 'react'; import ReactPaginate from 'react-paginate'; +import Icon from '@components/Icon'; +import colors from '@constants/colors'; import styles from './Pagination.module.scss'; type Props = { diff --git a/web-app/client/src/components/PrimitiveDescription/PrimitiveDescription.tsx b/web-app/client/src/components/PrimitiveDescription/PrimitiveDescription.tsx index 8134d9426..050dc09e5 100644 --- a/web-app/client/src/components/PrimitiveDescription/PrimitiveDescription.tsx +++ b/web-app/client/src/components/PrimitiveDescription/PrimitiveDescription.tsx @@ -1,8 +1,8 @@ +import cn from 'classnames'; +import { FC } from 'react'; import Icon from '@components/Icon'; import colors from '@constants/colors'; import { PrimitiveInfoType } from '@constants/primitiveInfoType'; -import cn from 'classnames'; -import { FC } from 'react'; import styles from './PrimitiveDescription.module.scss'; interface Props { diff --git a/web-app/client/src/components/ReportsLayout/ReportsLayout.tsx b/web-app/client/src/components/ReportsLayout/ReportsLayout.tsx index 5dfbdbf22..dfc1f8be1 100644 --- a/web-app/client/src/components/ReportsLayout/ReportsLayout.tsx +++ b/web-app/client/src/components/ReportsLayout/ReportsLayout.tsx @@ -1,8 +1,8 @@ -import Icon from '@components/Icon'; -import useTaskState from '@hooks/useTaskState'; import classNames from 'classnames'; import { useRouter } from 'next/router'; import React, { FC, PropsWithChildren } from 'react'; +import Icon from '@components/Icon'; +import useTaskState from '@hooks/useTaskState'; import { PrimitiveType } from 'types/globalTypes'; import styles from './ReportsLayout.module.scss'; diff --git a/web-app/client/src/components/ScrollableNodeTable/implementations/MFDTable.tsx b/web-app/client/src/components/ScrollableNodeTable/implementations/MFDTable.tsx index 3f39f1b60..99388b2ea 100644 --- a/web-app/client/src/components/ScrollableNodeTable/implementations/MFDTable.tsx +++ b/web-app/client/src/components/ScrollableNodeTable/implementations/MFDTable.tsx @@ -1,3 +1,4 @@ +import { FC, useMemo } from 'react'; import { MFDHighlight } from '@atoms/MFDTaskAtom'; import Icon from '@components/Icon'; @@ -7,7 +8,6 @@ import Table, { TableProps, } from '@components/ScrollableNodeTable'; import colors from '@constants/colors'; -import { FC, useMemo } from 'react'; import styles from './MFDTable.module.scss'; type MFDTableProps = { diff --git a/web-app/client/src/components/SignUpModal/SignUpModal.tsx b/web-app/client/src/components/SignUpModal/SignUpModal.tsx index dd041e7f2..77ce1bd8e 100644 --- a/web-app/client/src/components/SignUpModal/SignUpModal.tsx +++ b/web-app/client/src/components/SignUpModal/SignUpModal.tsx @@ -1,6 +1,6 @@ +import React, { FC, useState } from 'react'; import AuthSuccessModal from '@components/AuthSuccessModal'; import { useAuthContext } from '@hooks/useAuthContext'; -import React, { FC, useState } from 'react'; import ModalContainer, { ModalProps } from '../ModalContainer'; import CoreInfo from './steps/CoreInfo'; import EmailVerification from './steps/EmailVerification'; @@ -20,10 +20,7 @@ const SignUpModal: FC = ({ isOpen, onClose }) => { return ( <> - + {stage === 1 && } {stage === 2 && } diff --git a/web-app/client/src/components/TeamMemberBadge/TeamMemberBadge.tsx b/web-app/client/src/components/TeamMemberBadge/TeamMemberBadge.tsx index c96dd67b6..92fc77b67 100644 --- a/web-app/client/src/components/TeamMemberBadge/TeamMemberBadge.tsx +++ b/web-app/client/src/components/TeamMemberBadge/TeamMemberBadge.tsx @@ -1,8 +1,9 @@ +import Image from 'next/image'; +import { FC } from 'react'; import Icon from '@components/Icon'; import colors from '@constants/colors'; import { getTeamMembers_teamMembers_data_attributes } from '@graphql/operations/queries/__generated__/getTeamMembers'; import { cmsUrlWrapper } from '@utils/cmsUrlWrapper'; -import { FC } from 'react'; import styles from './TeamMemberBadge.module.scss'; type TeamMemberAttributes = getTeamMembers_teamMembers_data_attributes; diff --git a/web-app/client/src/components/Toast/ToastContainer.tsx b/web-app/client/src/components/Toast/ToastContainer.tsx index be7d602ec..1b0f50e8f 100644 --- a/web-app/client/src/components/Toast/ToastContainer.tsx +++ b/web-app/client/src/components/Toast/ToastContainer.tsx @@ -1,10 +1,10 @@ -import Icon from '@components/Icon'; import { FC } from 'react'; import { ToastContainerProps, ToastContainer as TostifyToastContainer, CloseButtonProps, } from 'react-toastify'; +import Icon from '@components/Icon'; import styles from './ToastContainer.module.scss'; const CloseButton: FC = ({ closeToast, ariaLabel }) => ( diff --git a/web-app/client/src/components/Tooltip/Tooltip.tsx b/web-app/client/src/components/Tooltip/Tooltip.tsx index 351b7c448..69d130625 100644 --- a/web-app/client/src/components/Tooltip/Tooltip.tsx +++ b/web-app/client/src/components/Tooltip/Tooltip.tsx @@ -1,5 +1,3 @@ -import Icon from '@components/Icon'; -import colors from '@constants/colors'; import { FloatingPortal, autoUpdate, @@ -9,11 +7,13 @@ import { useInteractions, useRole, } from '@floating-ui/react'; -import { useEffect, useState } from 'react'; +import { useState } from 'react'; +import Icon from '@components/Icon'; +import colors from '@constants/colors'; +import { portalRoot } from '@constants/portalRoot'; import { FCWithChildren } from 'types/react'; import styles from './Tooltip.module.scss'; -import { portalRoot } from '@constants/portalRoot'; interface Props { position?: 'top' | 'right' | 'bottom' | 'left'; diff --git a/web-app/client/src/components/WizardLayout/WizardLayout.tsx b/web-app/client/src/components/WizardLayout/WizardLayout.tsx index 82ee9baef..60a51b470 100644 --- a/web-app/client/src/components/WizardLayout/WizardLayout.tsx +++ b/web-app/client/src/components/WizardLayout/WizardLayout.tsx @@ -1,6 +1,6 @@ -import Icon from '@components/Icon'; import cn from 'classnames'; import { FC, PropsWithChildren, ReactElement } from 'react'; +import Icon from '@components/Icon'; import styles from './WizardLayout.module.scss'; interface Props extends PropsWithChildren { diff --git a/web-app/client/src/constants/portalRoot.ts b/web-app/client/src/constants/portalRoot.ts index fa5046865..fbcba2504 100644 --- a/web-app/client/src/constants/portalRoot.ts +++ b/web-app/client/src/constants/portalRoot.ts @@ -1 +1,4 @@ -export const portalRoot = typeof window !== 'undefined' ? document?.getElementById('portals-container-node'): null; +export const portalRoot = + typeof window !== 'undefined' + ? document?.getElementById('portals-container-node') + : null; diff --git a/web-app/client/src/pages/404.tsx b/web-app/client/src/pages/404.tsx index db25fb083..ae556c7b9 100644 --- a/web-app/client/src/pages/404.tsx +++ b/web-app/client/src/pages/404.tsx @@ -1,8 +1,8 @@ +import { NextPage } from 'next'; +import { useRouter } from 'next/router'; import Button from '@components/Button'; import Icon from '@components/Icon'; import styles from '@styles/404.module.scss'; -import { NextPage } from 'next'; -import { useRouter } from 'next/router'; const _404: NextPage = () => { const { push } = useRouter(); diff --git a/web-app/client/src/pages/_app.tsx b/web-app/client/src/pages/_app.tsx index e36a9b23b..d074d6c3c 100644 --- a/web-app/client/src/pages/_app.tsx +++ b/web-app/client/src/pages/_app.tsx @@ -8,7 +8,6 @@ import '@styles/globals.scss'; import { AppPropsWithLayout } from 'types/pageWithLayout'; import 'react-toastify/dist/ReactToastify.css'; - function MyApp({ Component, pageProps }: AppPropsWithLayout) { const getLayout = Component.getLayout ?? ((page) => page); diff --git a/web-app/client/src/pages/_document.tsx b/web-app/client/src/pages/_document.tsx index e42b687fa..73be3771b 100644 --- a/web-app/client/src/pages/_document.tsx +++ b/web-app/client/src/pages/_document.tsx @@ -1,6 +1,6 @@ +import { Html, Head, Main, NextScript } from 'next/document'; import GoogleAnalytics from '@components/GoogleAnalytics'; import { isGoogleAnalyticsEnabled } from '@utils/env'; -import { Html, Head, Main, NextScript } from 'next/document'; const MyDocument = () => { return ( @@ -27,7 +27,8 @@ const MyDocument = () => {
+ style={{ position: 'fixed', zIndex: 1001, inset: 0, height: 0 }} + /> ); diff --git a/web-app/client/src/pages/create-task/choose-file.tsx b/web-app/client/src/pages/create-task/choose-file.tsx index 11fc16f05..4966bdb3d 100644 --- a/web-app/client/src/pages/create-task/choose-file.tsx +++ b/web-app/client/src/pages/create-task/choose-file.tsx @@ -1,3 +1,7 @@ +import cn from 'classnames'; +import type { GetServerSideProps, NextPage } from 'next'; +import { useRouter } from 'next/router'; +import { useEffect, useMemo, useState } from 'react'; import Button from '@components/Button'; import { Collapse } from '@components/Collapse'; import { DatasetCard } from '@components/DatasetCard'; @@ -10,10 +14,6 @@ import { GET_ALGORITHMS_CONFIG } from '@graphql/operations/queries/getAlgorithms import { useAuthContext } from '@hooks/useAuthContext'; import { useTaskUrlParams } from '@hooks/useTaskUrlParams'; import styles from '@styles/ChooseFile.module.scss'; -import cn from 'classnames'; -import type { GetServerSideProps, NextPage } from 'next'; -import { useRouter } from 'next/router'; -import { useEffect, useMemo, useState } from 'react'; import { AllowedDataset } from 'types/algorithms'; import { MainPrimitiveType } from 'types/globalTypes'; diff --git a/web-app/client/src/pages/create-task/choose-primitive.tsx b/web-app/client/src/pages/create-task/choose-primitive.tsx index b760ed8cc..51fbcf345 100644 --- a/web-app/client/src/pages/create-task/choose-primitive.tsx +++ b/web-app/client/src/pages/create-task/choose-primitive.tsx @@ -1,3 +1,4 @@ +import { useRouter } from 'next/router'; import Button from '@components/Button'; import Icon from '@components/Icon'; import PrimitiveCard from '@components/PrimitiveCard'; @@ -6,7 +7,6 @@ import WizardLayout from '@components/WizardLayout'; import primitiveInfo from '@constants/primitiveInfoType'; import { useTaskUrlParams } from '@hooks/useTaskUrlParams'; import styles from '@styles/ChoosePrimitive.module.scss'; -import { useRouter } from 'next/router'; import { MainPrimitiveType } from 'types/globalTypes'; const header = ( diff --git a/web-app/client/src/pages/index.tsx b/web-app/client/src/pages/index.tsx index fd2215076..a3719c93b 100644 --- a/web-app/client/src/pages/index.tsx +++ b/web-app/client/src/pages/index.tsx @@ -1,8 +1,8 @@ -import UnidataLogo from '@assets/images/unidata-logo.svg?component'; -import Icon from '@components/Icon'; import type { NextPage } from 'next'; import { useRouter } from 'next/router'; import { useEffect } from 'react'; +import UnidataLogo from '@assets/images/unidata-logo.svg?component'; +import Icon from '@components/Icon'; import Button from '../components/Button'; import ExternalLink from '../components/ExternalLink'; import styles from '../styles/Home.module.scss'; diff --git a/web-app/client/src/pages/papers.tsx b/web-app/client/src/pages/papers.tsx index a4b3b4936..6fbc47cf3 100644 --- a/web-app/client/src/pages/papers.tsx +++ b/web-app/client/src/pages/papers.tsx @@ -1,3 +1,4 @@ +import { GetServerSideProps, NextPage } from 'next'; import Icon from '@components/Icon'; import PrPublicationCard from '@components/PrPublicationCard'; import SciencePublicationCard from '@components/SciencePublicationCard'; @@ -5,7 +6,6 @@ import cmsClient from '@graphql/cmsClient'; import { getPublications } from '@graphql/operations/queries/__generated__/getPublications'; import { GET_PUBLICATIONS } from '@graphql/operations/queries/getPublications'; import styles from '@styles/Papers.module.scss'; -import { GetServerSideProps, NextPage } from 'next'; interface Props { papers: getPublications; @@ -48,7 +48,6 @@ const Papers: NextPage = ({ papers }) => { ); }; - export const getServerSideProps: GetServerSideProps = async () => { const { data } = await cmsClient.query({ query: GET_PUBLICATIONS, diff --git a/web-app/client/src/pages/reports/clusters.tsx b/web-app/client/src/pages/reports/clusters.tsx index a5bbb0f30..1ff36ee98 100644 --- a/web-app/client/src/pages/reports/clusters.tsx +++ b/web-app/client/src/pages/reports/clusters.tsx @@ -1,3 +1,4 @@ +import { FC, ReactElement, useState } from 'react'; import Icon from '@components/Icon'; import Pagination from '@components/Pagination/Pagination'; import { ReportsLayout } from '@components/ReportsLayout/ReportsLayout'; @@ -7,7 +8,6 @@ import Tooltip from '@components/Tooltip'; import { getClustersPreview } from '@graphql/operations/queries/EDP/__generated__/getClustersPreview'; import useClustersPreview from '@hooks/useClustersPreview'; import styles from '@styles/Clusters.module.scss'; -import { FC, ReactElement, useState } from 'react'; import { NextPageWithLayout } from 'types/pageWithLayout'; const getCluster = (response?: getClustersPreview) => { diff --git a/web-app/client/src/pages/reports/dependencies.tsx b/web-app/client/src/pages/reports/dependencies.tsx index 15dc27eaa..f9c852ee1 100644 --- a/web-app/client/src/pages/reports/dependencies.tsx +++ b/web-app/client/src/pages/reports/dependencies.tsx @@ -1,4 +1,7 @@ import { useLazyQuery } from '@apollo/client'; +import type { GetServerSideProps } from 'next'; +import { ReactElement, useEffect, useMemo, useState } from 'react'; +import { FormProvider } from 'react-hook-form'; import Button from '@components/Button'; import DependencyList from '@components/DependencyList/DependencyList'; import DownloadResult from '@components/DownloadResult'; @@ -10,7 +13,6 @@ import { } from '@components/Filters'; import Icon from '@components/Icon'; import { Text } from '@components/Inputs'; -import ModalContainer from '@components/ModalContainer'; import Pagination from '@components/Pagination/Pagination'; import ReportsLayout from '@components/ReportsLayout'; import { TaskContextProvider, useTaskContext } from '@components/TaskContext'; @@ -24,12 +26,8 @@ import { GET_MAIN_TASK_DEPS } from '@graphql/operations/queries/getDeps'; import { GET_TASK_INFO } from '@graphql/operations/queries/getTaskInfo'; import styles from '@styles/Dependencies.module.scss'; import { convertDependencies } from '@utils/convertDependencies'; -import type { GetServerSideProps } from 'next'; -import { ReactElement, useEffect, useMemo, useState } from 'react'; -import { FormProvider } from 'react-hook-form'; import { IntersectionFilter, - OrderBy, OrderDirection, PrimitiveType, } from 'types/globalTypes'; diff --git a/web-app/client/src/pages/reports/metric-dependencies.tsx b/web-app/client/src/pages/reports/metric-dependencies.tsx index 5645fa8a1..5d0889614 100644 --- a/web-app/client/src/pages/reports/metric-dependencies.tsx +++ b/web-app/client/src/pages/reports/metric-dependencies.tsx @@ -1,17 +1,3 @@ -import { MFDHighlight } from '@atoms/MFDTaskAtom'; -import Button from '@components/Button'; -import Icon from '@components/Icon'; -import { ControlledSelect } from '@components/Inputs/Select'; - -import ListPropertiesModal from '@components/ListPropertiesModal'; -import Pagination from '@components/Pagination/Pagination'; -import ReportsLayout from '@components/ReportsLayout'; - -import { ScrollDirection } from '@components/ScrollableNodeTable'; -import { MFDTable } from '@components/ScrollableNodeTable/implementations/MFDTable'; -import useMFDHighlight from '@hooks/useMFDHighlight'; -import useMFDTask from '@hooks/useMFDTask'; -import styles from '@styles/MetricDependencies.module.scss'; import _ from 'lodash'; import { useRouter } from 'next/router'; import React, { @@ -26,6 +12,20 @@ import React, { useState, } from 'react'; import { useForm } from 'react-hook-form'; +import { MFDHighlight } from '@atoms/MFDTaskAtom'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; +import { ControlledSelect } from '@components/Inputs/Select'; + +import ListPropertiesModal from '@components/ListPropertiesModal'; +import Pagination from '@components/Pagination/Pagination'; +import ReportsLayout from '@components/ReportsLayout'; + +import { ScrollDirection } from '@components/ScrollableNodeTable'; +import { MFDTable } from '@components/ScrollableNodeTable/implementations/MFDTable'; +import useMFDHighlight from '@hooks/useMFDHighlight'; +import useMFDTask from '@hooks/useMFDTask'; +import styles from '@styles/MetricDependencies.module.scss'; import { MFDOrderingParameter, diff --git a/web-app/client/src/pages/team.tsx b/web-app/client/src/pages/team.tsx index c9b27d32a..7cfff42d3 100644 --- a/web-app/client/src/pages/team.tsx +++ b/web-app/client/src/pages/team.tsx @@ -1,10 +1,10 @@ +import { GetServerSideProps, NextPage } from 'next'; import Icon from '@components/Icon'; import TeamMemberBadge from '@components/TeamMemberBadge'; import cmsClient from '@graphql/cmsClient'; import { getTeamMembers } from '@graphql/operations/queries/__generated__/getTeamMembers'; import { GET_TEAM_MEMBERS } from '@graphql/operations/queries/getTeamMembers'; import styles from '@styles/Team.module.scss'; -import { GetServerSideProps, NextPage } from 'next'; interface Props { team: getTeamMembers;