Move contact page to its own route handler

This commit is contained in:
calzoneman 2015-10-27 22:04:21 -07:00
parent 88236e036c
commit 13d4a49976
5 changed files with 62 additions and 30 deletions

View file

@ -0,0 +1,27 @@
import clone from 'clone';
export default class WebConfiguration {
constructor(config) {
this.config = config;
}
getEmailContacts() {
return clone(this.config.contacts);
}
}
WebConfiguration.fromOldConfig = function (oldConfig) {
const config = {
contacts: []
};
oldConfig.get('contacts').forEach(contact => {
config.contacts.push({
name: contact.name,
email: contact.email,
title: contact.title
});
});
return new WebConfiguration(config);
};