Files
web/apps/scandic-web/server/routers/navigation/mypages/getSecondaryLinks.ts

33 lines
693 B
TypeScript

import * as routes from "@/constants/routes/myPages"
import { getIntl } from "@/i18n"
import type { Lang } from "@/constants/languages"
import type { MyPagesLink } from "./MyPagesLink"
export async function getSecondaryLinks({
lang,
}: {
lang: Lang
}): Promise<MyPagesLink[]> {
const intl = await getIntl()
const menuItems: MyPagesLink[] = [
{
type: "link",
text: intl.formatMessage({
defaultMessage: "About Scandic Friends",
}),
href: routes.scandicFriends[lang],
},
{
type: "link",
text: intl.formatMessage({
defaultMessage: "My profile",
}),
href: routes.profile[lang],
},
]
return menuItems
}