Untitled

mail@pastecode.io avatar
unknown
plain_text
9 days ago
633 B
1
Indexable
Never
const Template: Story<ShowSurveyProps> = (args) => {
    const { show } = useProcessSurvey("ProcessCompleted", "testProcess");
    const goToDashboard = () => {};
    return (
        <Button
            onClick={() =>
                show({
                    ...args,
                    onSurveyClosed: goToDashboard,
                })
            }
        >
            Show survey
        </Button>
    );
};

export const SurveyComponent = Template.bind({});
SurveyComponent.storyName = "Survey";
SurveyComponent.parameters = {
    msw: {
        handlers: [mocks.survey(), mocks.reviews()],
    },
};
Leave a Comment