Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: ({ className, ...props }) => (
<ChevronLeft className={cn("h-4 w-4", className)} {...props} />
),
IconRight: ({ className, ...props }) => (
<ChevronRight className={cn("h-4 w-4", className)} {...props} />
),
Chevron: ({ orientation, className, ...props }) => {
const Icon = orientation === "left" ? ChevronLeft : ChevronRight
return <Icon className={cn("h-4 w-4", className)} {...props} />
},
}}
{...props}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/seed-db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use server";
import { collection, writeBatch, getDocs, Firestore } from "firebase/firestore";
import { collection, writeBatch, getDocs, Firestore, doc } from "firebase/firestore";
import { mockMunicipalities, mockPermits } from "./data";

/**
Expand All @@ -17,7 +17,7 @@ export async function seedDatabase(firestore: Firestore, userId: string) {
if (municipalitiesSnapshot.empty) {
const municipalitiesBatch = writeBatch(firestore);
mockMunicipalities.forEach((municipality) => {
const docRef = collection(firestore, "municipalities").doc(municipality.id);
const docRef = doc(firestore, "municipalities", municipality.id);
municipalitiesBatch.set(docRef, municipality);
});
await municipalitiesBatch.commit();
Expand All @@ -33,7 +33,7 @@ export async function seedDatabase(firestore: Firestore, userId: string) {
const permitsBatch = writeBatch(firestore);
mockPermits.forEach((permit) => {
// Note: In a real scenario, you'd likely want unique IDs, but for mock data this is okay.
const docRef = collection(firestore, `users/${userId}/permits`).doc(permit.id);
const docRef = doc(firestore, `users/${userId}/permits`, permit.id);
permitsBatch.set(docRef, permit);
});
await permitsBatch.commit();
Expand Down