const logoutRedirect = ctx?.url ? `?r=${encodeURIComponent(ctx.url)}` : '';
const adminPath = (pagePathLevel > 0) ? `${'../'.repeat(pagePathLevel - 1)}` : 'admin/';
options.navLinks.push({
+ text: 'Account',
+ href: `${adminPath}settings`,
+ }, {
text: `Logout (${user})`,
href: `${adminPath}logout${logoutRedirect}`,
- }, {
- text: 'Settings',
- href: `${adminPath}settings`,
});
}