Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 41s
57 lines
2.5 KiB
TypeScript
57 lines
2.5 KiB
TypeScript
// 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';
|
|
|
|
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>
|
|
</div>
|
|
</div>
|
|
<SystemCheck />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|