title: Firebase NextJs Expected first argument to collection() to be a CollectionReference
body: <pre><code>const [stablesValue, stablesLoading, stablesError] = useCollection(
    collection(db, 'stables'),
    {
      snapshotListenOptions: { includeMetadataChanges: true },
    }
  );
  </code></pre>
  <p>This snippet of code is causing an error</p>
  <blockquote>
  <p>FirebaseError: [code=invalid-argument]: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore</p>
  </blockquote>
  <p>I can't seem to get why this is occuring and tried reading other stackoverflow threads but have not found any soulution to it yet.</p>
  <p>db is exported from my other file like this.</p>
  <pre><code>export const db = getFirestore(app)
  </code></pre>