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") {
|
||||
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>
|
||||
);
|
||||
@@ -26,7 +26,7 @@ export default function AdminPage() {
|
||||
|
||||
if (!session || session.user.role !== "admin") {
|
||||
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">
|
||||
<h1 className="text-2xl font-bold text-gray-800 mb-4">
|
||||
Access Denied
|
||||
@@ -70,7 +70,7 @@ export default function AdminPage() {
|
||||
];
|
||||
|
||||
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="mb-8">
|
||||
<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 Badge from "@/components/ui/Badge";
|
||||
import ContactForm from "@/components/ContactForm";
|
||||
import PageContainer from "@/components/ui/PageContainer";
|
||||
import PageHeader from "@/components/ui/PageHeader";
|
||||
|
||||
export default function ContactsPage() {
|
||||
const router = useRouter();
|
||||
@@ -171,26 +173,19 @@ export default function ContactsPage() {
|
||||
|
||||
if (showForm) {
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<PageContainer>
|
||||
<ContactForm
|
||||
initialData={editingContact}
|
||||
onSave={handleFormSave}
|
||||
onCancel={handleFormCancel}
|
||||
/>
|
||||
</div>
|
||||
</PageContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
{/* Header */}
|
||||
<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>
|
||||
<PageContainer>
|
||||
<PageHeader title="Kontakty" description="Zarządzaj kontaktami do projektów i współpracy">
|
||||
<Button onClick={() => setShowForm(true)}>
|
||||
<svg
|
||||
className="w-5 h-5 mr-2"
|
||||
@@ -207,7 +202,7 @@ export default function ContactsPage() {
|
||||
</svg>
|
||||
Dodaj kontakt
|
||||
</Button>
|
||||
</div>
|
||||
</PageHeader>
|
||||
|
||||
{/* Stats */}
|
||||
{stats && (
|
||||
@@ -610,6 +605,6 @@ export default function ContactsPage() {
|
||||
</Card>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</PageContainer>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, BarChart, Bar, ComposedChart, PieChart, Pie, Cell } from 'recharts';
|
||||
import { useTranslation } from "@/lib/i18n";
|
||||
import PageContainer from "@/components/ui/PageContainer";
|
||||
|
||||
export default function TeamLeadsDashboard() {
|
||||
const { t } = useTranslation();
|
||||
@@ -79,7 +80,7 @@ export default function TeamLeadsDashboard() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<PageContainer>
|
||||
<div className="flex items-center justify-between mb-8">
|
||||
<h1 className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||
{t('teamDashboard.title')}
|
||||
@@ -284,6 +285,6 @@ export default function TeamLeadsDashboard() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PageContainer>
|
||||
);
|
||||
}
|
||||
@@ -25,7 +25,7 @@ export default function DropdownTestPage() {
|
||||
};
|
||||
|
||||
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">
|
||||
Dropdown Component Test
|
||||
</h1>
|
||||
|
||||
Reference in New Issue
Block a user