Class

Register

Register(props)

Constructor

# new Register(props)

Register page that holds all the steps involved in the registration flow

Parameters:
Name Type Description
props React.ComponentProps

The Component props passed down from the parent (App).

View Source components/users/Register.js, line 1

  • module:React.useState
  • module:react-toastify
  • module:getToken

Requires

  • module:React.useState
  • module:react-toastify
  • module:getToken

Methods

# static change()

This function handles all the changes made in the registration form fields.

To Do:
  • Turn the update state function into a dynamic key value pair implementation with the spread operator.

View Source components/users/Register.js, line 194

# static nextStep()

A simple increment function to move between Registration steps.

The next step function is called when the next button is clicked on the registration form. It performs multiple validation checks. It renders an errors upon incomplete fields and allows progress if no errors are present. If no validation errors are present, the step is incremented and the field values are saved in the component state.

See:

View Source components/users/Register.js, line 125

# static previousStep()

A simple decrement function to move between Registration steps.

The previous step function is called when the back button is clicked on the registration form. It does not perform any validations, it simply decrements the step. If the user selected to be a student, the backwards step is set to 2, as the student does not have to fill out the professor information fields, present in step 2. If the user selected to be a professor, the backwards step is set to 1.

View Source components/users/Register.js, line 179

Type Definitions

# InstructorRegister

Properties:
Name Type Attributes Description
title String <optional>
officeHours String <optional>
officeLocation String <optional>
phone String <optional>
contactPolicy String <optional>
background String <optional>
researchInterests String <optional>
selectedPapersAndPublications String <optional>
website String <optional>
philosophy String <optional>

View Source components/users/Register.js, line 33

# setInstructorProfile(values)

Parameters:
Name Type Description
values InstructorRegister

View Source components/users/Register.js, line 53

# setUser(values)

Parameters:
Name Type Description
values UserRegister

View Source components/users/Register.js, line 48

# State

Properties:
Name Type Attributes Description
user UserRegister <optional>
setUser setUser

View Source components/users/Register.js, line 59

# State

Properties:
Name Type Attributes Description
instructor InstructorRegister <optional>
setInstructorProfile setInstructorProfile

View Source components/users/Register.js, line 66

# UserRegister

Properties:
Name Type Description
firstName String
lastName String
middleName String
email String

The email address of the user.

password String
passwordConf String
group String

View Source components/users/Register.js, line 21