Load initial values from Firebase/Firestore document

Hi All,

I’m quite new to javascript still so please excuse my ignorance…

Following this document here: Forms | TinaCMS Docs

I’m trying to use ‘loadinitialvalues()’ to populate my page’s themes from a store json file in Firebase/Firestore, I usually get either a unrecognized token ‘>’ promise error or it just does nothing…

This is my code for a test I did with some GCP storage buckets which works:
loadInitialValues() {
return fetch( 'https://storage.googleapis.com/projectname/data.json' )
.then((response) => response.json()); }

Any ideas on how I can integrate the below code into my intial value load?
function fetchData() {
if (currentUser) {
db.collection('users').doc(currentUser.uid).get().then(doc => {
return doc.data().displaydata
}) } }