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