feat: translate dashboard page and components to English
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,14 +67,14 @@ export default function DashboardPage() {
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Error al cargar los datos del dashboard");
|
||||
throw new Error("Error loading dashboard data");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
setDashboardData(data);
|
||||
} catch (err) {
|
||||
console.error("Dashboard fetch error:", err);
|
||||
setError(err instanceof Error ? err.message : "Error desconocido");
|
||||
setError(err instanceof Error ? err.message : "Unknown error");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ export default function DashboardPage() {
|
||||
fetchDashboardData();
|
||||
}, [fetchDashboardData]);
|
||||
|
||||
const userName = session?.user?.name?.split(" ")[0] || "Usuario";
|
||||
const userName = session?.user?.name?.split(" ")[0] || "User";
|
||||
const today = new Date();
|
||||
|
||||
return (
|
||||
@@ -93,10 +93,10 @@ export default function DashboardPage() {
|
||||
<div className="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-primary-800">
|
||||
Bienvenido, {userName}
|
||||
Welcome, {userName}
|
||||
</h1>
|
||||
<p className="text-primary-500 mt-1">
|
||||
{formatDate(today)} - Panel de administracion
|
||||
{formatDate(today)} - Admin panel
|
||||
</p>
|
||||
</div>
|
||||
{selectedSite && (
|
||||
@@ -121,7 +121,7 @@ export default function DashboardPage() {
|
||||
/>
|
||||
</svg>
|
||||
<span className="text-sm font-medium text-accent-700">
|
||||
Mostrando: {selectedSite.name}
|
||||
Showing: {selectedSite.name}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -161,7 +161,7 @@ export default function DashboardPage() {
|
||||
) : dashboardData ? (
|
||||
<>
|
||||
<StatCard
|
||||
title="Reservas Hoy"
|
||||
title="Today's Bookings"
|
||||
value={dashboardData.stats.todayBookings}
|
||||
color="blue"
|
||||
icon={
|
||||
@@ -181,7 +181,7 @@ export default function DashboardPage() {
|
||||
}
|
||||
/>
|
||||
<StatCard
|
||||
title="Ingresos Hoy"
|
||||
title="Today's Revenue"
|
||||
value={formatCurrency(dashboardData.stats.todayRevenue)}
|
||||
color="green"
|
||||
icon={
|
||||
@@ -201,7 +201,7 @@ export default function DashboardPage() {
|
||||
}
|
||||
/>
|
||||
<StatCard
|
||||
title="Ocupacion"
|
||||
title="Occupancy"
|
||||
value={`${dashboardData.stats.occupancyRate}%`}
|
||||
color="purple"
|
||||
icon={
|
||||
@@ -221,7 +221,7 @@ export default function DashboardPage() {
|
||||
}
|
||||
/>
|
||||
<StatCard
|
||||
title="Miembros Activos"
|
||||
title="Active Members"
|
||||
value={dashboardData.stats.activeMembers}
|
||||
color="accent"
|
||||
icon={
|
||||
@@ -248,7 +248,7 @@ export default function DashboardPage() {
|
||||
{!isLoading && dashboardData && (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<StatCard
|
||||
title="Reservas Pendientes"
|
||||
title="Pending Bookings"
|
||||
value={dashboardData.stats.pendingBookings}
|
||||
color="orange"
|
||||
icon={
|
||||
@@ -268,7 +268,7 @@ export default function DashboardPage() {
|
||||
}
|
||||
/>
|
||||
<StatCard
|
||||
title="Torneos Proximos"
|
||||
title="Upcoming Events"
|
||||
value={dashboardData.stats.upcomingTournaments}
|
||||
color="primary"
|
||||
icon={
|
||||
|
||||
Reference in New Issue
Block a user