This commit is contained in:
@@ -10,12 +10,8 @@ export function Analytics() {
|
||||
// Send beacon on mount and path change
|
||||
const sendBeacon = async () => {
|
||||
try {
|
||||
// Point to the Admin Dashboard API
|
||||
// In prod, this URL needs to be the absolute URL of admin_dash
|
||||
// For local docker, standard localhost access might work if CORS allows,
|
||||
// or we route through a proxy.
|
||||
// For this personal setup, let's assume they are on same domain or localhost.
|
||||
await fetch('http://localhost:3000/api/track', { // TODO: Make this configurable
|
||||
// Send beacon to THIS website's API, which will relay it to the admin dash
|
||||
await fetch('/api/analytics', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ path: pathname, timestamp: Date.now() }),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
@@ -2,7 +2,6 @@ export function Footer() {
|
||||
return (
|
||||
<footer className="w-full py-8 text-center text-xs text-zinc-400 dark:text-zinc-600 font-mono border-t border-zinc-200/50 dark:border-zinc-800/50 mt-auto">
|
||||
<div className="max-w-4xl mx-auto px-6 flex flex-col sm:flex-row justify-between items-center gap-4">
|
||||
<span>© {new Date().getFullYear()} John Doe. All rights reserved.</span>
|
||||
|
||||
<div className="flex gap-4">
|
||||
<a href="#" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors">Twitter</a>
|
||||
|
||||
Reference in New Issue
Block a user