mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-23 01:17:56 +00:00
feat(governance): implement real blockchain data for governance section
- Update ElectionsInterface to fetch real elections from welati pallet - Add MyVotes component for user voting history (proposals, elections, delegations) - Add GovernanceHistory component for completed elections and proposals - Integrate DelegationManager into GovernanceInterface delegation tab - Fix linter errors across multiple files (unused imports, type annotations) - Update eslint.config.js to ignore SDK docs and CJS files
This commit is contained in:
@@ -4,6 +4,10 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs';
|
||||
import GovernanceOverview from './governance/GovernanceOverview';
|
||||
import ProposalsList from './governance/ProposalsList';
|
||||
import ElectionsInterface from './governance/ElectionsInterface';
|
||||
import DelegationManager from './delegation/DelegationManager';
|
||||
import MyVotes from './governance/MyVotes';
|
||||
import GovernanceHistory from './governance/GovernanceHistory';
|
||||
|
||||
const GovernanceInterface: React.FC = () => {
|
||||
const [activeTab, setActiveTab] = useState('overview');
|
||||
|
||||
@@ -62,21 +66,15 @@ const GovernanceInterface: React.FC = () => {
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="delegation" className="mt-6">
|
||||
<div className="text-center py-12 text-gray-400">
|
||||
Delegation interface coming soon...
|
||||
</div>
|
||||
<DelegationManager />
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="voting" className="mt-6">
|
||||
<div className="text-center py-12 text-gray-400">
|
||||
Voting history coming soon...
|
||||
</div>
|
||||
<MyVotes />
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="history" className="mt-6">
|
||||
<div className="text-center py-12 text-gray-400">
|
||||
Governance history coming soon...
|
||||
</div>
|
||||
<GovernanceHistory />
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
</div>
|
||||
@@ -84,4 +82,4 @@ const GovernanceInterface: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default GovernanceInterface;
|
||||
export default GovernanceInterface;
|
||||
|
||||
Reference in New Issue
Block a user