fix(results): 🐛 useLogs returns nothing
This commit is contained in:
@ -21,14 +21,13 @@ import { Log } from 'db'
|
||||
import { useLogs } from 'services/typebots/logs'
|
||||
import { isDefined } from 'utils'
|
||||
|
||||
export const LogsModal = ({
|
||||
resultId,
|
||||
onClose,
|
||||
}: {
|
||||
type Props = {
|
||||
typebotId: string
|
||||
resultId?: string
|
||||
onClose: () => void
|
||||
}) => {
|
||||
const { isLoading, logs } = useLogs(resultId)
|
||||
}
|
||||
export const LogsModal = ({ typebotId, resultId, onClose }: Props) => {
|
||||
const { isLoading, logs } = useLogs(typebotId, resultId)
|
||||
return (
|
||||
<Modal isOpen={isDefined(resultId)} onClose={onClose} size="xl">
|
||||
<ModalOverlay />
|
||||
|
@ -152,10 +152,13 @@ export const SubmissionsContent = ({
|
||||
contentLabel="You are seeing complete submissions only."
|
||||
/>
|
||||
)}
|
||||
<LogsModal
|
||||
resultId={inspectingLogsResultId}
|
||||
onClose={handleLogsModalClose}
|
||||
/>
|
||||
{publishedTypebot && (
|
||||
<LogsModal
|
||||
typebotId={publishedTypebot?.typebotId}
|
||||
resultId={inspectingLogsResultId}
|
||||
onClose={handleLogsModalClose}
|
||||
/>
|
||||
)}
|
||||
<Flex w="full" justifyContent="flex-end">
|
||||
<ResultsActionButtons
|
||||
isDeleteLoading={isDeleteLoading}
|
||||
|
Reference in New Issue
Block a user