chore: suit eslint rules
This commit is contained in:
@@ -27,7 +27,7 @@ type ApplicationParams = {
|
||||
connectionId?: string;
|
||||
};
|
||||
|
||||
const ReconnectConnection = (props: any) => {
|
||||
const ReconnectConnection = (props: any): React.ReactElement => {
|
||||
const { application, onClose } = props;
|
||||
const { connectionId } = useParams() as ApplicationParams;
|
||||
|
||||
@@ -40,7 +40,7 @@ const ReconnectConnection = (props: any) => {
|
||||
);
|
||||
}
|
||||
|
||||
export default function Application() {
|
||||
export default function Application(): React.ReactElement {
|
||||
const theme = useTheme();
|
||||
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md'), { noSsr: true });
|
||||
const formatMessage = useFormatMessage();
|
||||
@@ -155,7 +155,7 @@ export default function Application() {
|
||||
</Box>
|
||||
|
||||
<Routes>
|
||||
<Route path={`${URLS.FLOWS}/*`} element={<AppFlows appKey={appKey} />} />
|
||||
<Route path={`${URLS.FLOWS}/*`} element={<AppFlows />} />
|
||||
|
||||
<Route path={`${URLS.CONNECTIONS}/*`} element={<AppConnections appKey={appKey} />} />
|
||||
|
||||
|
@@ -17,7 +17,7 @@ import { GET_CONNECTED_APPS } from 'graphql/queries/get-connected-apps';
|
||||
import * as URLS from 'config/urls';
|
||||
import type { App } from 'types/app';
|
||||
|
||||
export default function Applications() {
|
||||
export default function Applications(): React.ReactElement {
|
||||
const navigate = useNavigate();
|
||||
const formatMessage = useFormatMessage();
|
||||
const [appName, setAppName] = React.useState(null);
|
||||
|
@@ -10,7 +10,7 @@ import { CREATE_FLOW } from 'graphql/mutations/create-flow';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
export default function CreateFlow() {
|
||||
export default function CreateFlow(): React.ReactElement {
|
||||
const navigate = useNavigate();
|
||||
const formatMessage = useFormatMessage();
|
||||
const [createFlow] = useMutation(CREATE_FLOW);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import EditorLayout from 'components/EditorLayout';
|
||||
|
||||
export default function FlowEditor() {
|
||||
export default function FlowEditor(): React.ReactElement {
|
||||
return (
|
||||
<EditorLayout />
|
||||
)
|
||||
|
@@ -3,7 +3,7 @@ import { Routes, Route } from 'react-router-dom';
|
||||
import CreateFlowPage from './create';
|
||||
import EditorPage from './index';
|
||||
|
||||
export default function EditorRoutes() {
|
||||
export default function EditorRoutes(): React.ReactElement {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/create" element={<CreateFlowPage />} />
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import Container from 'components/Container';
|
||||
|
||||
export default function Explore() {
|
||||
export default function Explore(): React.ReactElement {
|
||||
return (
|
||||
<Box sx={{ py: 3 }}>
|
||||
<Container>
|
||||
|
@@ -1,32 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { useQuery } from '@apollo/client';
|
||||
import { Link, Route, Navigate, Routes, useParams, useMatch, useNavigate } from 'react-router-dom';
|
||||
import type { LinkProps } from 'react-router-dom';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||
import { useParams, } from 'react-router-dom';
|
||||
import Box from '@mui/material/Box';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import Tabs from '@mui/material/Tabs';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
|
||||
import useFormatMessage from 'hooks/useFormatMessage';
|
||||
import { GET_APP } from 'graphql/queries/get-app';
|
||||
import * as URLS from 'config/urls';
|
||||
|
||||
import ConditionalIconButton from 'components/ConditionalIconButton';
|
||||
import AppConnections from 'components/AppConnections';
|
||||
import AppFlows from 'components/AppFlows';
|
||||
import AddAppConnection from 'components/AddAppConnection';
|
||||
import AppIcon from 'components/AppIcon';
|
||||
import Container from 'components/Container';
|
||||
import PageTitle from 'components/PageTitle';
|
||||
|
||||
type ApplicationParams = {
|
||||
flowId: string;
|
||||
};
|
||||
|
||||
export default function Flow() {
|
||||
export default function Flow(): React.ReactElement {
|
||||
const { flowId } = useParams() as ApplicationParams;
|
||||
|
||||
return (
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { Link, Routes, Route, useNavigate } from 'react-router-dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
import type { LinkProps } from 'react-router-dom';
|
||||
import { useQuery } from '@apollo/client';
|
||||
import Box from '@mui/material/Box';
|
||||
@@ -16,7 +16,7 @@ import { GET_FLOWS } from 'graphql/queries/get-flows';
|
||||
import * as URLS from 'config/urls';
|
||||
import type { Flow } from 'types/flow';
|
||||
|
||||
export default function Flows() {
|
||||
export default function Flows(): React.ReactElement {
|
||||
const formatMessage = useFormatMessage();
|
||||
const [flowName, setFlowName] = React.useState('');
|
||||
const { data } = useQuery(GET_FLOWS);
|
||||
|
Reference in New Issue
Block a user