46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { PUBLIC_GMAPS_API_KEY } from "$env/static/public";
|
|
import type { Database } from "./database.d.ts";
|
|
|
|
export type Table<T extends keyof Database["public"]["Tables"]> =
|
|
Database["public"]["Tables"][T]["Row"];
|
|
export type Enum<T extends keyof Database["public"]["Enums"]> = Database["public"]["Enums"][T];
|
|
|
|
export const availableStudySpaceTags = [
|
|
"Crowded",
|
|
"Group study",
|
|
"24/7",
|
|
"Food allowed",
|
|
"No food allowed",
|
|
"Well lit",
|
|
"Poorly lit",
|
|
"Whiteboard",
|
|
"Restricted access",
|
|
"Hot",
|
|
"Air conditioned",
|
|
"Cold",
|
|
"PCs",
|
|
"Cringe"
|
|
];
|
|
|
|
export const volumeTags = ["Silent", "Some Noise", "Loud"];
|
|
export const wifiTags = ["Good WiFi", "Moderate WiFi", "Bad/No WiFi"];
|
|
export const powerOutletTags = ["Many Outlets", "Some Outlets", "No Outlets"];
|
|
|
|
export const allTags = [...availableStudySpaceTags, ...volumeTags, ...wifiTags, ...powerOutletTags];
|
|
|
|
export const reportTypes = [
|
|
"Inappropriate content",
|
|
"Duplicate content",
|
|
"Incorrect content",
|
|
"Other"
|
|
];
|
|
|
|
export async function gmapsLoader() {
|
|
const { Loader } = await import("@googlemaps/js-api-loader");
|
|
return new Loader({
|
|
apiKey: PUBLIC_GMAPS_API_KEY,
|
|
version: "weekly",
|
|
libraries: ["places"]
|
|
});
|
|
}
|