mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-24 01:37:55 +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:
@@ -58,7 +58,7 @@ const SidebarNav: React.FC<{ structure: object, onLinkClick: () => void, onSDKCl
|
||||
);
|
||||
};
|
||||
|
||||
const renderNav = (struct: any) => {
|
||||
const renderNav = (struct: Record<string, unknown>) => {
|
||||
return Object.entries(struct).map(([key, value]) => {
|
||||
if (typeof value === 'string') {
|
||||
// Check if it's the SDK docs special link
|
||||
@@ -204,8 +204,8 @@ const Docs: React.FC = () => {
|
||||
const sanitized = DOMPurify.sanitize(parsed);
|
||||
setContent(sanitized);
|
||||
|
||||
} catch (e: any) {
|
||||
setError(e.message);
|
||||
} catch (e: unknown) {
|
||||
setError(e instanceof Error ? e.message : 'Unknown error');
|
||||
setContent('');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Layout from '@/components/Layout';
|
||||
import { Plus, MessageSquare, Eye, TrendingUp, Search } from 'lucide-react';
|
||||
import { Plus, MessageSquare, Eye, Search } from 'lucide-react';
|
||||
|
||||
const Forum: React.FC = () => {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ExternalLink, Globe, Book, Compass, FileCode, HandCoins, Users, Wrench, MessageCircle, GitFork, Server, Activity, Zap, Database, Radio, Layers, ArrowLeft } from 'lucide-react';
|
||||
import { ExternalLink, Globe, Book, Compass, FileCode, HandCoins, Users, Wrench, MessageCircle, Server, Activity, Zap, Database, Radio, Layers, ArrowLeft } from 'lucide-react';
|
||||
|
||||
interface SubdomainItem {
|
||||
name: string;
|
||||
@@ -41,7 +41,7 @@ const subdomainList: SubdomainItem[] = [
|
||||
];
|
||||
|
||||
const Subdomains: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
useTranslation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const mainServices = subdomainList.filter(s => s.category === 'main');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Layout from '@/components/Layout';
|
||||
import { CheckCircle, Zap, Server, Globe } from 'lucide-react';
|
||||
import { Server, Globe } from 'lucide-react';
|
||||
|
||||
const Telemetry: React.FC = () => {
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ interface NetworkPageProps {
|
||||
}
|
||||
|
||||
const NetworkPage: React.FC<NetworkPageProps> = ({
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
id,
|
||||
name,
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user