style(frontend): prettier baseline format (no logic change)
This commit is contained in:
@@ -9,7 +9,7 @@ const mem = new Map<string, string>();
|
||||
const hasLS = typeof globalThis.localStorage?.setItem === "function";
|
||||
|
||||
export function getToken(): string | null {
|
||||
return hasLS ? localStorage.getItem(TOKEN_KEY) : mem.get(TOKEN_KEY) ?? null;
|
||||
return hasLS ? localStorage.getItem(TOKEN_KEY) : (mem.get(TOKEN_KEY) ?? null);
|
||||
}
|
||||
|
||||
export function setToken(t: string | null): void {
|
||||
@@ -181,8 +181,7 @@ export const api = {
|
||||
listBookmarks: (id: number) => apiFetch<Bookmark[]>(`/books/${id}/bookmarks`),
|
||||
createBookmark: (id: number, locator: Record<string, unknown>, percent: number, note: string) =>
|
||||
apiFetch<Bookmark>(`/books/${id}/bookmarks`, { method: "POST", body: { locator, percent, note } }),
|
||||
patchBookmark: (id: number, note: string) =>
|
||||
apiFetch<void>(`/bookmarks/${id}`, { method: "PATCH", body: { note } }),
|
||||
patchBookmark: (id: number, note: string) => apiFetch<void>(`/bookmarks/${id}`, { method: "PATCH", body: { note } }),
|
||||
deleteBookmark: (id: number) => apiFetch<void>(`/bookmarks/${id}`, { method: "DELETE" }),
|
||||
listProgress: () => apiFetch<ProgressRow[]>("/progress"),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user