Fix/mypages clientside menu * feat: move mypages menu to client side * Merge branch 'master' of bitbucket.org:scandic-swap/web into fix/mypages-clientside-menu * wip * wip * wip * refactor: reorganize MyPages navigation logic and improve type definitions * refactor: enhance MyPagesMobileDropdown with loading states and skeletons * refactor: clean up header component and improve myPagesNavigation query structure * Merge branch 'master' of bitbucket.org:scandic-swap/web into fix/mypages-clientside-menu Approved-by: Linus Flood
29 lines
639 B
TypeScript
29 lines
639 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({ id: "About Scandic Friends" }),
|
|
href: routes.scandicFriends[lang],
|
|
},
|
|
{
|
|
type: "link",
|
|
text: intl.formatMessage({ id: "My Profile" }),
|
|
href: routes.profile[lang],
|
|
},
|
|
]
|
|
|
|
return menuItems
|
|
}
|