refactor: add hydrogen customer drilldown
This commit is contained in:
@@ -44,7 +44,10 @@ export function parseHydrogenDrillContext(search: string): HydrogenDrillContext
|
||||
const requestedLevel = params.get('hydrogenLevel');
|
||||
const parsedStationId = stationId(params.get('hydrogenStation'));
|
||||
const parsedStationName = params.get('hydrogenStationName')?.trim() || undefined;
|
||||
const customerName = params.get('hydrogenCustomer')?.trim() || undefined;
|
||||
const rawCustomerName = params.get('hydrogenCustomer')?.trim();
|
||||
const customerName = rawCustomerName && rawCustomerName.length <= 128
|
||||
? rawCustomerName
|
||||
: undefined;
|
||||
const context: HydrogenDrillContext = {
|
||||
level: requestedLevel === 'station' && parsedStationId !== undefined
|
||||
? 'station'
|
||||
|
||||
Reference in New Issue
Block a user