- Replace all mock data with real API calls across pages (issues, agents, inbox, settings) - Add AuthProvider context with JWT login/logout, member/agent name resolution - Implement login page with email-based auth flow - Add settings page with workspace editing and member list - Wire up real-time WebSocket for live issue updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
467 B
TypeScript
17 lines
467 B
TypeScript
import { ApiClient } from "@multica/sdk";
|
|
|
|
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8080";
|
|
|
|
export const api = new ApiClient(API_BASE_URL);
|
|
|
|
// Initialize token from localStorage on load
|
|
if (typeof window !== "undefined") {
|
|
const token = localStorage.getItem("multica_token");
|
|
if (token) {
|
|
api.setToken(token);
|
|
}
|
|
const wsId = localStorage.getItem("multica_workspace_id");
|
|
if (wsId) {
|
|
api.setWorkspaceId(wsId);
|
|
}
|
|
}
|