update lang

This commit is contained in:
Your Name committed 2026-06-14 18:58:45 -04:00
1 parent 46f00c76a4
commit f5b60ff63e
30 files changed
+546 -652

No files matched your search

+4 -2
View File
@@ -1,5 +1,6 @@
import { useState, useEffect } from 'react'
import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import Navbar from '../components/Navbar'
import Footer from '../components/Footer'
import { API_BASE, formatPrice, type Category, type Order, type CustomerAddress } from '../types'
@@ -22,6 +23,7 @@ import {
export default function ProfilePage() {
const { token, customer, setAuth } = useAuthStore()
const { i18n } = useTranslation()
const [categories, setCategories] = useState<Category[]>([])
// Tab State
@@ -58,11 +60,11 @@ export default function ProfilePage() {
// Fetch Categories
useEffect(() => {
fetch(`${API_BASE}/categories`)
fetch(`${API_BASE}/categories?lang=${i18n.language}`)
.then(res => res.json())
.then(setCategories)
.catch(console.error)
}, [])
}, [i18n.language])
// Fetch Customer Profile details & Points dynamically
const fetchProfile = () => {