Files
dashboards/apps/customer/src/lib/api.ts
T
Alireza HassaniandCursor f566387c61 Initial commit: Meshkee dashboards monorepo.
Includes business, customer, and super-admin apps with shared packages and production deploy scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 13:48:53 +03:30

21 lines
489 B
TypeScript

import { createApiClient } from '@meshkee/dashboard-core'
const API_BASE_URL =
import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:3000/api/v1'
export const api = createApiClient({
baseUrl: API_BASE_URL,
accessTokenKey: 'meshkee_customer_access_token',
refreshTokenKey: 'meshkee_customer_refresh_token',
})
export const {
apiRequest,
getAccessToken,
getRefreshToken,
setTokens,
clearTokens,
} = api
export { ApiError, isAbortError } from '@meshkee/dashboard-core'