feat: implement core platform features including business directory, admin dashboard, authentication, and API infrastructure
Some checks failed
Build and Push App / build (push) Failing after 16m2s

This commit is contained in:
2026-04-18 22:10:19 +02:00
parent 6ec1a3ae84
commit 3e2063e4fa
89 changed files with 4405 additions and 967 deletions

View File

@@ -31,12 +31,24 @@ export default function AnalyticsTracker() {
// 1. Track Page Views
useEffect(() => {
// Attempt to get userId from localStorage (common in this app's auth setup)
let userId = null;
try {
const userStr = localStorage.getItem('user');
if (userStr) {
const user = JSON.parse(userStr);
userId = user.id;
}
} catch (e) {}
sendEvent({
type: 'PAGE_VIEW',
path: pathname,
metadata: {
userAgent: navigator.userAgent,
screen: `${window.innerWidth}x${window.innerHeight}`,
referrer: document.referrer,
userId: userId
}
});