fix: update background color for loading and access denied states in AdminPage
fix: refactor ContactsPage to use PageContainer and PageHeader components fix: refactor TeamLeadsDashboard to use PageContainer for consistent layout fix: update background color in DropdownTestPage for improved visibility
This commit is contained in:
@@ -18,7 +18,7 @@ export default function AdminPage() {
|
|||||||
|
|
||||||
if (status === "loading") {
|
if (status === "loading") {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex items-center justify-center">
|
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center">
|
||||||
<div className="text-lg">Loading...</div>
|
<div className="text-lg">Loading...</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -26,7 +26,7 @@ export default function AdminPage() {
|
|||||||
|
|
||||||
if (!session || session.user.role !== "admin") {
|
if (!session || session.user.role !== "admin") {
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex items-center justify-center">
|
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<h1 className="text-2xl font-bold text-gray-800 mb-4">
|
<h1 className="text-2xl font-bold text-gray-800 mb-4">
|
||||||
Access Denied
|
Access Denied
|
||||||
@@ -70,7 +70,7 @@ export default function AdminPage() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 py-8">
|
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-8">
|
||||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/Card";
|
|||||||
import Button from "@/components/ui/Button";
|
import Button from "@/components/ui/Button";
|
||||||
import Badge from "@/components/ui/Badge";
|
import Badge from "@/components/ui/Badge";
|
||||||
import ContactForm from "@/components/ContactForm";
|
import ContactForm from "@/components/ContactForm";
|
||||||
|
import PageContainer from "@/components/ui/PageContainer";
|
||||||
|
import PageHeader from "@/components/ui/PageHeader";
|
||||||
|
|
||||||
export default function ContactsPage() {
|
export default function ContactsPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -171,26 +173,19 @@ export default function ContactsPage() {
|
|||||||
|
|
||||||
if (showForm) {
|
if (showForm) {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<PageContainer>
|
||||||
<ContactForm
|
<ContactForm
|
||||||
initialData={editingContact}
|
initialData={editingContact}
|
||||||
onSave={handleFormSave}
|
onSave={handleFormSave}
|
||||||
onCancel={handleFormCancel}
|
onCancel={handleFormCancel}
|
||||||
/>
|
/>
|
||||||
</div>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<PageContainer>
|
||||||
{/* Header */}
|
<PageHeader title="Kontakty" description="Zarządzaj kontaktami do projektów i współpracy">
|
||||||
<div className="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-6">
|
|
||||||
<div>
|
|
||||||
<h1 className="text-3xl font-bold text-gray-900">Kontakty</h1>
|
|
||||||
<p className="text-gray-600 mt-1">
|
|
||||||
Zarządzaj kontaktami do projektów i współpracy
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button onClick={() => setShowForm(true)}>
|
<Button onClick={() => setShowForm(true)}>
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5 mr-2"
|
className="w-5 h-5 mr-2"
|
||||||
@@ -207,7 +202,7 @@ export default function ContactsPage() {
|
|||||||
</svg>
|
</svg>
|
||||||
Dodaj kontakt
|
Dodaj kontakt
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</PageHeader>
|
||||||
|
|
||||||
{/* Stats */}
|
{/* Stats */}
|
||||||
{stats && (
|
{stats && (
|
||||||
@@ -610,6 +605,6 @@ export default function ContactsPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, BarChart, Bar, ComposedChart, PieChart, Pie, Cell } from 'recharts';
|
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, BarChart, Bar, ComposedChart, PieChart, Pie, Cell } from 'recharts';
|
||||||
import { useTranslation } from "@/lib/i18n";
|
import { useTranslation } from "@/lib/i18n";
|
||||||
|
import PageContainer from "@/components/ui/PageContainer";
|
||||||
|
|
||||||
export default function TeamLeadsDashboard() {
|
export default function TeamLeadsDashboard() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -79,7 +80,7 @@ export default function TeamLeadsDashboard() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<PageContainer>
|
||||||
<div className="flex items-center justify-between mb-8">
|
<div className="flex items-center justify-between mb-8">
|
||||||
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||||
{t('teamDashboard.title')}
|
{t('teamDashboard.title')}
|
||||||
@@ -284,6 +285,6 @@ export default function TeamLeadsDashboard() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ export default function DropdownTestPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-8 space-y-8 bg-gray-100 min-h-screen">
|
<div className="p-8 space-y-8 bg-gray-50 dark:bg-gray-900 min-h-screen">
|
||||||
<h1 className="text-3xl font-bold text-gray-900">
|
<h1 className="text-3xl font-bold text-gray-900">
|
||||||
Dropdown Component Test
|
Dropdown Component Test
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user