feat: localize membership tier display
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { useAuthStore } from '@/features/auth/stores/authStore.js';
|
||||
import config from '@/config.js';
|
||||
import { i18n } from '@/plugins/i18n.js';
|
||||
|
||||
export function useClient() {
|
||||
const client = axios.create({
|
||||
@@ -36,6 +37,8 @@ export function useClient() {
|
||||
config.headers.Authorization = `Bearer ${authStore.accessToken}`;
|
||||
}
|
||||
|
||||
config.headers['Accept-Language'] = i18n.global.locale.value ?? 'en';
|
||||
|
||||
if (config.data instanceof FormData) {
|
||||
console.log(`Data is FormData, removing explicit Content-Type header for: ${config.method?.toUpperCase()} ${config.url}`);
|
||||
delete config.headers['Content-Type'];
|
||||
|
||||
Reference in New Issue
Block a user