build: add pnpm
This commit is contained in:
@ -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<
|
||||
|
@ -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 {
|
||||
|
@ -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>()
|
||||
|
Reference in New Issue
Block a user