'use client';

import { headers } from 'next/headers';

export function useLocale() {
  try {
    const headersList = headers();
    return headersList.get('x-locale') || 'fr';
  } catch {
    return 'fr';
  }
}
