13 lines
253 B
TypeScript
13 lines
253 B
TypeScript
"use client"
|
|
import { useParams } from "next/navigation"
|
|
|
|
import { LangParams } from "@/types/params"
|
|
|
|
/**
|
|
* A hook to get the current lang from the URL
|
|
*/
|
|
export default function useLang() {
|
|
const { lang } = useParams<LangParams>()
|
|
return lang
|
|
}
|