added firebase

This commit is contained in:
Xeovalyte 2022-09-19 09:36:47 +02:00
parent 953fd137b1
commit 9f86c8e4c3
5 changed files with 2459 additions and 3474 deletions

View File

@ -4,4 +4,13 @@
<NuxtPage class="overflow-y-scroll mb-auto" />
<LayoutNavbar />
</div>
</template>
</template>
<script setup>
import { doc, getFirestore, serverTimestamp, writeBatch, collection, getDocs } from "firebase/firestore";
const db = getFirestore()
provide('firebase', { db })
</script>

View File

@ -1,4 +1,8 @@
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss', '@formkit/nuxt', 'nuxt-icon', '@vueuse/nuxt', '@pinia/nuxt']
modules: [
'@nuxtjs/tailwindcss',
'nuxt-icon',
'@vueuse/nuxt',
]
})

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,6 @@
"nuxt-icon": "^0.1.5"
},
"dependencies": {
"@formkit/nuxt": "^1.0.0-beta.10",
"@pinia/nuxt": "^0.4.2",
"firebase": "^9.10.0",
"vue-toastification": "^2.0.0-rc.5"
}

View File

@ -1,15 +1,15 @@
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
const firebaseConfig = {
apiKey: "AIzaSyCtHFyfCRkBt8MX5LPFogBi8ssKSypkW0g",
authDomain: "wrbapp.firebaseapp.com",
projectId: "wrbapp",
storageBucket: "wrbapp.appspot.com",
messagingSenderId: "160377508482",
appId: "1:160377508482:web:f651ccf2b242daf4879a9b",
measurementId: "G-31HEXDSVPZ"
};
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
export default defineNuxtPlugin((nuxtApp) => {
const firebaseConfig = {
apiKey: "AIzaSyCtHFyfCRkBt8MX5LPFogBi8ssKSypkW0g",
authDomain: "wrbapp.firebaseapp.com",
projectId: "wrbapp",
storageBucket: "wrbapp.appspot.com",
messagingSenderId: "160377508482",
appId: "1:160377508482:web:f651ccf2b242daf4879a9b",
measurementId: "G-31HEXDSVPZ"
};
const app = initializeApp(firebaseConfig);
})