Skip to content

Commit

Permalink
Updates comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thiessenp-cds committed Oct 22, 2024
1 parent 13e3c4f commit a9266a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/hooks/useFormDelayContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ export const useFormDelay = () => {
return {
/**
* Adds the number of required questions in the current group to the form delay state.
* @param currentGroup group Id of the current page
* @param form current form
* @param form the current form
* @param currentGroupId group Id of the current page
*/
addRequiredQuestions: (form: FormProperties, currentGroup: string) => {
addRequiredQuestions: (form: FormProperties, currentGroupId: string) => {
try {
const groupIds = form?.groups?.[currentGroup].elements;
const groupIds = form?.groups?.[currentGroupId].elements;
if (!groupIds) {
return;
}
Expand All @@ -95,6 +95,7 @@ export const useFormDelay = () => {
* questions on a form. For group forms, subtract the time spent on the form from the tally of
* required questions from their group history (pages navigated).
* @param form current form
* @param hasGroups boolean to determine if the form has groups
* @returns delay in seconds or in the case of an error -1 is used to fallback to no delay
*/
getFormDelay: (formElements: FormElement[], hasGroups: boolean) => {
Expand Down

0 comments on commit a9266a0

Please sign in to comment.