Skip to content
Shayna Kothari edited this page Mar 11, 2021 · 1 revision

Overview

You may find yourself needing to add a new page to Huxley! Let's talk about the steps to doing that:

  1. Create a component that you want to be displayed. This doesn't have to be complete yet, and can start out with a copy of an existing component -- but it's useful to have a component to play with and be able to view as you make your changes!

  2. Add the route to your component. Our frontend routing is done using React Router, and is all in Huxley.js. Import your component to the file and, depending on what user type you want your page displayed for, add its route next to the others. For example, if I wanted to add a new delegate page called Rooms, I might do that by adding the following lines of code at around line 208:

     <Route path="/delegate/rooms">
         <DelegateRoomView />
     </Route>
    

    You should have a Route tag with the path parameter as the path you are trying to add your new page at; inside the tag should be the component you want to display at that page.

  3. Add a navigation tab to your new page. If you're adding a new delegate page, you should add a new navigation tab in DelegateView; for advisors, in AdvisorView; and for chairs, in ChairView.

  4. Iterate on and finish your component. That's it! Just make sure the component you're using for your page is what you want it to be, and you're good to go!

Clone this wiki locally