Skip to content

Commit fe987a4

Browse files
committed
added order dashboard
1 parent f3965a4 commit fe987a4

2 files changed

Lines changed: 63 additions & 180 deletions

File tree

frontend/src/app/order/page.tsx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"use client";
2+
3+
import { useState } from 'react';
4+
import MakerTab from '@/components/MakerTab';
5+
import ResolverTab from '@/components/ResolverTab';
6+
import AdminTab from '@/components/AdminTab';
7+
import ResolverApproval from '@/components/ResolverApproval';
8+
import { NetworkValidation } from '@/components/NetworkValidation';
9+
10+
export default function Home() {
11+
const [activeTab, setActiveTab] = useState('maker');
12+
13+
const tabs = [
14+
{ id: 'maker', label: 'Maker', component: <MakerTab /> },
15+
{ id: 'resolver', label: 'Resolver', component: <ResolverTab /> },
16+
{ id: 'admin', label: 'Admin', component: <AdminTab /> },
17+
];
18+
19+
return (
20+
<NetworkValidation>
21+
<div className="container mx-auto px-4 py-6">
22+
{/* Header */}
23+
<div className="text-center mb-8">
24+
<h1 className="text-3xl font-bold text-gray-800 mb-2">
25+
Order Protocol Dashboard
26+
</h1>
27+
<p className="text-gray-600">
28+
Manage makers, resolvers, and protocol administration
29+
</p>
30+
</div>
31+
32+
{/* Resolver Approval Section */}
33+
<div className="mb-8">
34+
<ResolverApproval />
35+
</div>
36+
37+
{/* Tab Navigation */}
38+
<div className="flex justify-center mb-8">
39+
<div className="bg-white rounded-lg shadow-md p-1 inline-flex">
40+
{tabs.map((tab) => (
41+
<button
42+
key={tab.id}
43+
onClick={() => setActiveTab(tab.id)}
44+
className={`px-6 py-3 rounded-md font-medium transition-all ${
45+
activeTab === tab.id
46+
? 'bg-blue-500 text-white shadow-md'
47+
: 'text-gray-600 hover:text-gray-800 hover:bg-gray-100'
48+
}`}
49+
>
50+
{tab.label}
51+
</button>
52+
))}
53+
</div>
54+
</div>
55+
56+
{/* Tab Content */}
57+
<div className="bg-white rounded-lg shadow-lg p-6">
58+
{tabs.find(tab => tab.id === activeTab)?.component}
59+
</div>
60+
</div>
61+
</NetworkValidation>
62+
);
63+
}

frontend/src/components/MakerDashboard.tsx

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)