Canvas live collaboration using firebase

I am trying to make a collaborative whiteboard and send it’s details to firebase/firestore and then run a fetch from different users to access the data, tried creating an instance using the y-fire provider but this results only in an empty instance being created with server timestamps without data being sent

UI Library used: tldraw

const doc = new Y.Doc();

const yMap = doc.getMap('tldraw'); // Create or get a shared Y.Map

const yprovider = new FireProvider({ app, ydoc: doc, path: `tldrawroom/${1000}` });

// Define the observer function for Y.Map
const mapObserver = (event) => {
    console.log("Map changed:", yMap.toJSON());
    setParsedData(yMap.toJSON());
};

yMap.observe(mapObserver);

setYdoc(doc);

trying to send the local storage json to firestore here but it is not recieved, where am i going wrong?