fix architecture and write new tests
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { cookies } from 'next/headers'
|
||||
import { MARKETPLACE_LANGUAGE_COOKIE, SHARED_LANGUAGE_COOKIE, isMarketplaceLanguage, type MarketplaceLanguage } from './i18n'
|
||||
|
||||
export function getMarketplaceLanguage(): MarketplaceLanguage {
|
||||
const cookieStore = cookies()
|
||||
export async function getMarketplaceLanguage(): Promise<MarketplaceLanguage> {
|
||||
const cookieStore = await cookies()
|
||||
const cookieValue =
|
||||
cookieStore.get(SHARED_LANGUAGE_COOKIE)?.value ??
|
||||
cookieStore.get(MARKETPLACE_LANGUAGE_COOKIE)?.value
|
||||
|
||||
Reference in New Issue
Block a user