Compare commits

..

5 Commits

Author SHA1 Message Date
Viktor Rådberg
c6dd0bc777 eslint 2025-11-17 22:24:07 +01:00
Viktor Rådberg
55c02385b5 fix eslint 2025-11-17 22:04:34 +01:00
Viktor Rådberg
6690a3b256 unauthenticated github request 2025-11-17 21:55:38 +01:00
Viktor Rådberg
c5bb7eb04b upgrade packages and use pnpm instead of bun 2025-11-17 21:51:24 +01:00
Viktor Rådberg
de99c0b7e9 remove unused 2025-11-17 21:39:36 +01:00
3 changed files with 12 additions and 27 deletions

View File

@@ -1,7 +1,11 @@
{
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",

View File

@@ -19,10 +19,10 @@ const Container = twc.div<RotationDivProps>((props) => [
]);
export const ExtraCountersGrid = twc.div<RotationDivProps>((props) => [
'flex absolute flex-grow pointer-events-none',
'flex absolute flex-row flex-grow pointer-events-none overflow-x-scroll overflow-y-hidden ',
props.$rotation === Rotation.SideFlipped || props.$rotation === Rotation.Side
? 'flex-col h-full w-auto overflow-y-scroll overflow-x-hidden bottom-auto right-0'
: 'flex-row w-full overflow-x-scroll overflow-y-hidden bottom-0',
? 'flex-col-reverse h-full w-auto bottom-auto right-0'
: 'w-full bottom-0',
]);
type ExtraCountersBarProps = {

View File

@@ -1,30 +1,17 @@
import { initializeApp } from 'firebase/app';
import { Analytics, getAnalytics, logEvent } from 'firebase/analytics';
import { getAnalytics, logEvent } from 'firebase/analytics';
const firebaseConfig = {
apiKey: 'AIzaSyCZ1AHMb5zmWS4VoRnC-OBxTswUfrJ0mlY',
authDomain: 'life-trinket.firebaseapp.com',
projectId: 'life-trinket',
storageBucket: 'life-trinket.firebasestorage.app',
storageBucket: 'life-trinket.appspot.com',
messagingSenderId: '508011650619',
appId: '1:508011650619:web:bdc7d0b6f8707b1f9e861e',
measurementId: 'G-BE86QSSG14',
};
const app = initializeApp(firebaseConfig);
let analytics: Analytics | null = null;
const getAnalyticsInstance = () => {
if (!analytics) {
try {
analytics = getAnalytics(app);
} catch (error) {
console.error('Failed to initialize Firebase Analytics:', error);
return null;
}
}
return analytics;
};
const analytics = getAnalytics(app);
export const useAnalytics = () => {
const trackEvent = (
@@ -36,18 +23,12 @@ export const useAnalytics = () => {
return;
}
const analyticsInstance = getAnalyticsInstance();
if (!analyticsInstance) {
console.warn('Analytics not available');
return;
}
const paramsWithVersion = {
...eventParams,
app_version: import.meta.env.VITE_APP_VERSION,
};
logEvent(analyticsInstance, eventName, paramsWithVersion);
logEvent(analytics, eventName, paramsWithVersion);
};
return { trackEvent };