-
Notifications
You must be signed in to change notification settings - Fork 1
Header
aaron ngu edited this page Nov 2, 2019
·
6 revisions
- page 'location' | 'volunteerLogin' | 'signUp' | 'checkIn' | 'adminLogin' |
These values are pre-defined and their corresponding values are stored in /src/constants.jsx. The values need to be imported as shown below(import constants from './constants.jsx'). If the page doesn't have a specific props.page(i.e admin views shift data, volunteer data, locations page), leave props.page unassigned. Usage:
import Head from './components/header/header.jsx;
import constants from './constants.jsx;
const subText = constants.HEADER.SUB_HEADER;
function YourComponent(){
return(
<div>
<Head page={subText.location}/>
</div>
);
}
Or:
import Head from './components/header/header.jsx;
import constants from './constants.jsx;
function YourComponent(){
return(
<div>
<Head page={constants.HEADER.SUB_HEADER.location}/>
</div>
);
}