portal-www
Version:
Nova Portal Website. Based on Next starter by Ueno
47 lines (42 loc) • 1.05 kB
text/typescript
type NavItem = {
id: string;
text: string;
href: string;
};
export function getContractSubnav(
productName: string | undefined | null,
customerId: string | undefined,
contractId: string,
): NavItem[] {
const Overview = {
id: 'overview',
text: 'common:hero.overview',
href: `/beta/${customerId}/askriftir/${contractId}`,
};
const Settings = {
id: 'settings',
text: 'common:hero.settings',
href: `/beta/${customerId}/askriftir/${contractId}/stillingar`,
};
const PaymentHistory = {
id: 'paymentHistory',
text: 'common:hero.payedHistory',
href: `/beta/${customerId}/askriftir/${contractId}/greidslusaga`,
};
const History = {
id: 'history',
text: 'common:hero.history',
href: `/beta/${customerId}/askriftir/${contractId}/sagan`,
};
switch (productName) {
case 'AlltSaman':
return [Overview, PaymentHistory, Settings];
break;
case 'Ljósleiðari':
return [Overview, History];
break;
default:
return [Overview];
break;
}
}