I am trying to populate my paths from a query to firestore. I can't figure out how to import the required packages to make the query. Is this possible or should I give up now?
---
import { initializeApp } from 'firebase/app';
import { getFirestore } from 'firebase-admin/firestore';
const firebaseConfig = {
...
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const { item } = Astro.params;
const items = db.collection('lost-items');
const paths = [];
items.forEach((item) => paths.push({ params: { item: item.id } }));
console.log('staticPaths', paths);
export function getStaticPaths() {
return paths;
}
---
<p>{item}</p>