ecatch-kyst / web

IT Bachelor project @ NTNU ⚡🎣
https://ecatch-kyst-beta.firebaseapp.com
GNU General Public License v3.0
5 stars 0 forks source link

🤯 Add persistence to Firestore #39

Closed balazsorban44 closed 5 years ago

balazsorban44 commented 5 years ago

Description

https://firebase.google.com/docs/firestore/manage-data/enable-offline

FS.enablePersistence()
  .catch(({code}) => {
    switch (code) {
    case 'failed-precondition':
      // Multiple tabs open, persistence can only be enabled
      // in one tab at a time.
      break
    case 'unimplemented':
      // The current browser does not support all of the
      // features required to enable persistence
      break
    default:
      break
    }
  })