chore: introduce @automatisch/types
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
bbb6f0b0ff
commit
3391578655
@@ -5,6 +5,7 @@ import { useQuery } from '@apollo/client';
|
||||
import Box from '@mui/material/Box';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
import type { IApp } from '@automatisch/types';
|
||||
|
||||
import ConditionalIconButton from 'components/ConditionalIconButton';
|
||||
import Container from 'components/Container';
|
||||
@@ -15,7 +16,6 @@ import SearchInput from 'components/SearchInput';
|
||||
import useFormatMessage from 'hooks/useFormatMessage'
|
||||
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(): React.ReactElement {
|
||||
const navigate = useNavigate();
|
||||
@@ -69,7 +69,7 @@ export default function Applications(): React.ReactElement {
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
{data?.getConnectedApps?.map((app: App) => (
|
||||
{data?.getConnectedApps?.map((app: IApp) => (
|
||||
<AppRow key={app.name} application={app} />
|
||||
))}
|
||||
|
||||
|
@@ -5,6 +5,7 @@ import { useQuery } from '@apollo/client';
|
||||
import Box from '@mui/material/Box';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
import type { IFlow } from '@automatisch/types';
|
||||
|
||||
import FlowRow from 'components/FlowRow';
|
||||
import ConditionalIconButton from 'components/ConditionalIconButton';
|
||||
@@ -14,14 +15,13 @@ import SearchInput from 'components/SearchInput';
|
||||
import useFormatMessage from 'hooks/useFormatMessage'
|
||||
import { GET_FLOWS } from 'graphql/queries/get-flows';
|
||||
import * as URLS from 'config/urls';
|
||||
import type { Flow } from 'types/flow';
|
||||
|
||||
export default function Flows(): React.ReactElement {
|
||||
const formatMessage = useFormatMessage();
|
||||
const [flowName, setFlowName] = React.useState('');
|
||||
const { data } = useQuery(GET_FLOWS);
|
||||
|
||||
const flows: Flow[] = data?.getFlows?.filter((flow: Flow) => flow.name?.toLowerCase().includes(flowName.toLowerCase()));
|
||||
const flows: IFlow[] = data?.getFlows?.filter((flow: IFlow) => flow.name?.toLowerCase().includes(flowName.toLowerCase()));
|
||||
|
||||
const onSearchChange = React.useCallback((event) => {
|
||||
setFlowName(event.target.value);
|
||||
|
Reference in New Issue
Block a user