This commit is contained in:
parent
1fb0a45aa9
commit
7d86e2b8d2
|
|
@ -6,6 +6,7 @@ import { useEffect, useTransition } from 'react'
|
|||
import { Globe } from 'lucide-react'
|
||||
|
||||
export function LanguageSwitcher() {
|
||||
console.log('home-redirecting to 2==========================>')
|
||||
const router = useRouter()
|
||||
const pathname = usePathname()
|
||||
const [isPending, startTransition] = useTransition()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ const isValidLocale = (locale: string): locale is (typeof i18nConfig.locales)[nu
|
|||
}
|
||||
|
||||
export default function HomeRedirector() {
|
||||
console.log('home-redirecting to 1==========================>')
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { NextResponse, type NextRequest } from "next/server"
|
|||
import i18nConfig from "./i18nConfig"
|
||||
|
||||
export async function middleware(request: NextRequest) {
|
||||
console.log('home-redirecting to 3==========================>')
|
||||
const { pathname } = request.nextUrl
|
||||
const preferredLanguage = request.cookies.get("preferred-language")?.value
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue