Merged in fix/mypages-clientside-menu (pull request #1344)

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
This commit is contained in:
Joakim Jäderberg
2025-02-17 07:47:33 +00:00
committed by Linus Flood
parent ef1d3ee065
commit 2791f07f67
18 changed files with 334 additions and 251 deletions
+6 -9
View File
@@ -1,9 +1,6 @@
import { logout } from "@/constants/routes/handleAuth"
import { serverClient } from "@/lib/trpc/server"
import {
getPrimaryLinks,
getSecondaryLinks,
} from "@/components/MyPages/menuItems"
import Divider from "@/components/TempDesignSystem/Divider"
import Link from "@/components/TempDesignSystem/Link"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
@@ -30,14 +27,13 @@ export default async function SidebarMyPages() {
}
async function PrimaryLinks() {
const lang = getLang()
const links = await getPrimaryLinks({ lang })
const nav = await serverClient().navigation.myPages({})
return (
<>
<Divider color="beige" />
<ul className={styles.list}>
{links.map((link) => (
{nav?.primaryLinks.map((link) => (
<li key={link.href}>
<Link
color="burgundy"
@@ -58,14 +54,15 @@ async function PrimaryLinks() {
async function SecondaryLinks() {
const lang = getLang()
const links = await getSecondaryLinks({ lang })
const nav = await serverClient().navigation.myPages({})
const intl = await getIntl()
return (
<>
<Divider color="beige" />
<ul className={styles.list}>
{links.map((link) => (
{nav?.secondaryLinks.map((link) => (
<li key={link.href}>
<Link
color="burgundy"