2
0

build: add pnpm

This commit is contained in:
Baptiste Arnaud
2022-08-08 08:21:36 +02:00
parent 8c3b5058f1
commit ee338f62dc
183 changed files with 19442 additions and 18364 deletions

View File

@ -2,8 +2,9 @@ import { ResultHeaderCell, ResultWithAnswers } from 'models'
import { createContext, ReactNode, useContext, useMemo } from 'react'
import {
convertResultsToTableData,
TableData,
useResults as useFetchResults,
} from 'services/typebots'
} from 'services/typebots/results'
import { KeyedMutator } from 'swr'
import { isDefined, parseResultHeader } from 'utils'
import { useTypebot } from './TypebotContext'
@ -15,10 +16,7 @@ const resultsContext = createContext<{
resultHeader: ResultHeaderCell[]
totalResults: number
totalHiddenResults?: number
tableData: {
id: string
[key: string]: { plainText: string; element?: JSX.Element } | string
}[]
tableData: TableData[]
onDeleteResults: (totalResultsDeleted: number) => void
fetchMore: () => void
mutate: KeyedMutator<

View File

@ -150,12 +150,6 @@ export const TypebotContext = ({
new Date(typebot.updatedAt) >
new Date(currentTypebotRef.current.updatedAt)
) {
console.log(
'Incoming typebot',
typebot,
'Current typebot',
currentTypebotRef.current
)
setLocalTypebot({ ...typebot })
}
@ -392,7 +386,7 @@ export const useFetchedTypebot = ({
},
Error
>(`/api/typebots/${typebotId}`, fetcher, {
dedupingInterval: env('E2E_TEST') === 'enabled' ? 0 : undefined,
dedupingInterval: env('E2E_TEST') === 'true' ? 0 : undefined,
})
if (error && onError) onError(error)
return {

View File

@ -14,14 +14,9 @@ const typebotDndContext = createContext<{
setDraggedTypebot: Dispatch<SetStateAction<TypebotInDashboard | undefined>>
mouseOverFolderId?: string | null
setMouseOverFolderId: Dispatch<SetStateAction<string | undefined | null>>
}>({
setDraggedTypebot: () => {
console.log('Not implemented')
},
setMouseOverFolderId: () => {
console.log('Not implemented')
},
})
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
}>({})
export const TypebotDndContext = ({ children }: { children: ReactNode }) => {
const [draggedTypebot, setDraggedTypebot] = useState<TypebotInDashboard>()