2
0

🧰 Aggregate utils & set up results collection in viewer

This commit is contained in:
Baptiste Arnaud
2021-12-29 10:22:26 +01:00
parent 447172d0cb
commit f088f694b9
42 changed files with 404 additions and 141 deletions

View File

@ -1,4 +0,0 @@
import { NextApiResponse } from 'next'
export const methodNotAllowed = (res: NextApiResponse) =>
res.status(405).json({ message: 'Method Not Allowed' })

View File

@ -9,7 +9,7 @@ import {
firstStepOffsetY,
} from 'contexts/GraphContext'
import { roundCorners } from 'svg-round-corners'
import { isDefined } from './utils'
import { isDefined } from 'utils'
export const computeFlowChartConnectorPath = ({
sourcePosition,

View File

@ -39,10 +39,6 @@ export const insertItemInList = <T>(
newItem: T
): T[] => [...arr.slice(0, index), newItem, ...arr.slice(index)]
export const isDefined = <T>(value: T | undefined | null): value is T => {
return <T>value !== undefined && <T>value !== null
}
export const preventUserFromRefreshing = (e: BeforeUnloadEvent) => {
e.preventDefault()
e.returnValue = ''