/survey-popup

Primary LanguageTypeScript

Modal Survey

This code was created for a challenge during a selection process.

The Challenge consisted of a modal that presented a quiz to the user

requirements:

  1. Use ReactJS
  2. The modal should appear after 2 seconds
  3. The app should have 'Next' and 'Previous' buttons on the steps which need them.
  4. The app should have a 'Submit' button on the last step, which on click should set the survey as submitted and close the popup.
  5. If the browser tab was closed before the survey was submitted and subsequently re-opened, the script should re-open the survey and continue from where the user left off.
  6. The survey should not re-open if it was already submitted.

The steps was previously defined as implemented

Getting started

Instal the dependencies

$ yarn

Run the project

$ yarn dev

You can access the project in the browser at http://localhost:5173/

Building the project

Run the build script

$ yarn build

The build will be in the dist folder. Application Script and style will be in assets folder