Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions field-logic/src/components/SurveyWizard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { SurveyEngine } from '../lib/engine';
import type { SurveyDefinition, SurveyNode } from '../lib/types';
import { SurveyEngine } from '../lib/SurveyEngine';
import type { SurveyDefinition, SurveyNode } from '../types/schema';
import '../styles/main.css';

interface Props {
Expand Down Expand Up @@ -30,7 +30,7 @@ export const SurveyWizard: React.FC<Props> = ({ definition }) => {
return;
}

const nextNode = engine.next(inputValue);
const nextNode = engine.submitAnswer(inputValue);
setCurrentNode(nextNode);
setInputValue(null); // Reset input for next question
};
Expand Down