fix: refactor language switcher

This commit is contained in:
Christel Westerberg
2024-06-03 09:38:17 +02:00
parent 2c102c62e0
commit 095edcce8c
14 changed files with 196 additions and 230 deletions

View File

@@ -1,17 +0,0 @@
.desktop {
display: none;
}
.mobile {
display: block;
}
@media (min-width: 950px) {
.desktop {
display: block;
}
.mobile {
display: none;
}
}

View File

@@ -1,21 +0,0 @@
import { serverClient } from "@/lib/trpc/server"
import Desktop from "@/components/Current/Header/LanguageSwitcher/Desktop"
import Mobile from "@/components/Current/Header/LanguageSwitcher/Mobile"
import styles from "./page.module.css"
export default async function LanguageSwitcher() {
const data = await serverClient().contentstack.accountPage.languageSwitcher()
return (
<>
<section className={styles.desktop}>
<Desktop currentLanguage={data.lang} urls={data.urls} />
</section>
<section className={styles.mobile}>
<Mobile currentLanguage={data.lang} urls={data.urls} />
</section>
</>
)
}