This commit is contained in:
AntoninoP 2024-06-29 20:08:50 +02:00
commit 51d1036a16
4 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# React + Vite
[![Deploy to Firebase Hosting on merge](https://github.com/Antoninop/servii-frontend/actions/workflows/firebase-hosting-merge.yml/badge.svg)](https://github.com/Antoninop/servii-frontend/actions/workflows/firebase-hosting-merge.yml)
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

View File

@ -9,5 +9,6 @@
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "d4d9229f2a274196abc7fa7fc90428f4"}'></script><!-- End Cloudflare Web Analytics -->
</body>
</html>

View File

@ -20,6 +20,14 @@ const App = () => {
const [loading, setLoading] = useState(true);
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://static.cloudflareinsights.com/beacon.min.js';
script.async = true;
script.defer = true;
script.data = JSON.stringify({
token: '5cef39a7410e4a4e8ab3dfbe163b73d0',
});
const unsubscribe = auth.onAuthStateChanged((user) => {
setUser(user);
setLoading(false);

View File

@ -4,7 +4,7 @@ import { getAuth, GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
const firebaseConfig = {
apiKey: "AIzaSyAmIEy4uzsBTzQGhGkn7srDONu8QUoUVHs",
authDomain: "servi-e6705.firebaseapp.com",
authDomain: "app.servii.fr",
projectId: "servi-e6705",
storageBucket: "servi-e6705.appspot.com",
messagingSenderId: "201267205657",