14 lines
352 B
TypeScript
14 lines
352 B
TypeScript
/**
|
|
* Initializes and exports a singleton PocketBase instance for use throughout the app.
|
|
*
|
|
* Throws if the PocketBase URL is invalid.
|
|
*/
|
|
import PocketBase from "pocketbase";
|
|
import { POCKETBASE_URL } from "@/config";
|
|
|
|
export const pb = new PocketBase(POCKETBASE_URL);
|
|
|
|
export function isAuthenticated(): boolean {
|
|
return pb.authStore.isValid;
|
|
}
|