Added redirect page

This commit is contained in:
2025-06-26 20:48:29 +02:00
parent 9b377a83ec
commit 3bd9a73760
9 changed files with 619 additions and 12 deletions

View File

@@ -16,16 +16,10 @@ export default async function Dashboard() {
// Determine the most visited URL display value
const mostVisitedDisplay = stats.mostVisitedUrl
? stats.mostVisitedUrl.visitCount > 0
? `${stats.mostVisitedUrl.title} (${stats.mostVisitedUrl.visitCount})`
? `${stats.mostVisitedUrl.title || stats.mostVisitedUrl.slug || "Untitled"} (${stats.mostVisitedUrl.visitCount})`
: "No visits"
: "No URLs"
const mostVisitedDescription = stats.mostVisitedUrl
? stats.mostVisitedUrl.visitCount > 0
? `/${stats.mostVisitedUrl.slug} - ${stats.mostVisitedUrl.visitCount} visits`
: "No URLs have been visited yet"
: "Create your first shortened URL"
return (
<div className="p-6">
<h1 className="text-2xl font-bold text-foreground mb-4 block">Dashboard</h1>
@@ -46,7 +40,7 @@ export default async function Dashboard() {
title="Most Visited URL"
value={mostVisitedDisplay}
icon={<TrendingUp className="h-4 w-4 text-muted-foreground" />}
description={mostVisitedDescription}
description="Most popular shortened link"
/>
</div>