Skip to content

Commit

Permalink
Merge pull request #3273 from bettyblocks/feat/navtooutput-interactio…
Browse files Browse the repository at this point in the history
…n-by-default-PAGE-3785

feat: navToOutputUrl by default in questionnaire start
  • Loading branch information
jrquak authored Nov 2, 2023
2 parents 1a6e652 + 83d94ae commit 60d5f84
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/prefabs/pageWithQuestionnaireStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
PrefabComponentOption,
wrapper,
linked,
PrefabInteraction,
InteractionType,
} from '@betty-blocks/component-sdk';
import {
Box as prefabBox,
Expand Down Expand Up @@ -49,6 +51,18 @@ import {
ModelQuery,
} from './types';

const interactions: PrefabInteraction[] = [
{
type: InteractionType.Global,
name: 'navigateToOutputUrl',
sourceEvent: 'onActionSuccess',
ref: {
sourceComponentId: '#createAction',
},
parameters: [],
},
];

const attrs = {
name: 'Questionnaire Startpage',
icon: Icon.SubmitButtonIcon,
Expand All @@ -61,6 +75,7 @@ const attrs = {
previewImage:
'https://assets.bettyblocks.com/63b1c6ccc6874e0796e5cc5b7e41b3da_assets/files/b520d74dff324c5f8e06b319d02c4c6e',
category: 'FORMV2',
interactions,
};

const beforeCreate = ({
Expand Down

0 comments on commit 60d5f84

Please sign in to comment.