- Extract IssueDetail into reusable component - Inbox: add body/type fields, bulk actions, read state - Pages: consistent layout patterns - Workspace avatar, markdown, realtime sync improvements Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
541 B
TypeScript
18 lines
541 B
TypeScript
import { ApiClient } from "@multica/sdk";
|
|
import { createLogger } from "./logger";
|
|
|
|
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8080";
|
|
|
|
export const api = new ApiClient(API_BASE_URL, { logger: createLogger("api") });
|
|
|
|
// 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);
|
|
}
|
|
}
|