Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 1x 4x | // src/pages/admin/AdminPage.tsx
import React from 'react';
import { SystemCheck } from './components/SystemCheck';
import { Link } from 'react-router-dom';
import { ShieldExclamationIcon } from '../../components/icons/ShieldExclamationIcon';
import { ChartBarIcon } from '../../components/icons/ChartBarIcon';
import { DocumentMagnifyingGlassIcon } from '../../components/icons/DocumentMagnifyingGlassIcon';
import { BuildingStorefrontIcon } from '../../components/icons/BuildingStorefrontIcon';
export const AdminPage: React.FC = () => {
// The onReady prop for SystemCheck is present to allow for future UI changes,
// such as showing a loading state while the system checks are running.
// Currently, it does not affect the UI.
return (
<div className="max-w-3xl mx-auto py-8 px-4">
<div className="mb-8">
<Link to="/" className="text-brand-primary hover:underline">
← Back to Main App
</Link>
<h1 className="text-3xl font-bold text-gray-800 dark:text-white mt-2">Admin Dashboard</h1>
<p className="text-gray-500 dark:text-gray-400">Tools and system health checks.</p>
</div>
<div className="space-y-8">
<div className="bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4">
<h3 className="text-lg font-bold text-gray-800 dark:text-white flex items-center mb-3">
Management
</h3>
<div className="space-y-2">
<Link
to="/admin/corrections"
className="flex items-center p-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700/50 transition-colors"
>
<ShieldExclamationIcon className="w-6 h-6 mr-3 text-brand-primary" />
<span className="font-semibold">Review Corrections</span>
</Link>
<Link
to="/admin/stats"
className="flex items-center p-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700/50 transition-colors"
>
<ChartBarIcon className="w-6 h-6 mr-3 text-brand-primary" />
<span className="font-semibold">View Statistics</span>
</Link>
<Link
to="/admin/flyer-review"
className="flex items-center p-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700/50 transition-colors"
>
<DocumentMagnifyingGlassIcon className="w-6 h-6 mr-3 text-brand-primary" />
<span className="font-semibold">Flyer Review Queue</span>
</Link>
<Link
to="/admin/stores"
className="flex items-center p-3 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700/50 transition-colors"
>
<BuildingStorefrontIcon className="w-6 h-6 mr-3 text-brand-primary" />
<span className="font-semibold">Manage Stores</span>
</Link>
</div>
</div>
<SystemCheck />
</div>
</div>
);
};
|