Handle saved builds and old URLs

This commit is contained in:
Cmdr McDonald
2016-11-14 11:57:39 +00:00
parent 0c94c81746
commit 4486aa2e2b
5 changed files with 17 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ import PowerManagement from '../components/PowerManagement';
import CostSection from '../components/CostSection';
import ModalExport from '../components/ModalExport';
import Slider from '../components/Slider';
import * as Utils from '../utils/UtilityFunctions';
const SPEED_SERIES = ['boost', '4 Pips', '2 Pips', '0 Pips'];
const SPEED_COLORS = ['#0088d2', '#ff8c0d', '#D26D00', '#c06400'];
@@ -58,7 +59,7 @@ export default class OutfittingPage extends Page {
_initState(context) {
let params = context.route.params;
let shipId = params.ship;
let code = params.code;
let code = Utils.fromUrlSafe(params.code);
let buildName = params.bn;
let data = Ships[shipId]; // Retrieve the basic ship properties, slots and defaults
let savedCode = Persist.getBuild(shipId, buildName);