mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-24 00:27:55 +00:00
Fix all shadow deprecation warnings across entire mobile app
- Replaced shadowColor/shadowOffset/shadowOpacity/shadowRadius with boxShadow - Fixed 28 files (21 screens + 7 components) - Preserved elevation for Android compatibility - All React Native Web deprecation warnings resolved Files fixed: - All screen components - All reusable components - Navigation components - Modal components
This commit is contained in:
@@ -4,7 +4,7 @@ import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { useDashboard } from '@/contexts/DashboardContext';
|
||||
import { FileText, Building2, Home, Bell, ChevronLeft, ChevronRight, Upload, User, Sun, ShieldCheck } from 'lucide-react';
|
||||
@@ -36,7 +36,7 @@ const announcements = [
|
||||
];
|
||||
|
||||
export default function Citizens() {
|
||||
const { selectedAccount } = usePolkadot();
|
||||
const { selectedAccount } = usePezkuwi();
|
||||
const { user } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import { User, Mail, Phone, Globe, MapPin, Calendar, Shield, AlertCircle, ArrowLeft, Award, Users, TrendingUp, UserMinus } from 'lucide-react';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
@@ -18,7 +18,7 @@ import { ReferralDashboard } from '@/components/referral/ReferralDashboard';
|
||||
|
||||
export default function Dashboard() {
|
||||
const { user } = useAuth();
|
||||
const { api, isApiReady, selectedAccount } = usePolkadot();
|
||||
const { api, isApiReady, selectedAccount } = usePezkuwi();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
const [profile, setProfile] = useState<Record<string, unknown> | null>(null);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { GraduationCap } from 'lucide-react';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { CourseList } from '@/components/perwerde/CourseList';
|
||||
import { StudentDashboard } from '@/components/perwerde/StudentDashboard';
|
||||
@@ -14,7 +14,7 @@ import { Button } from '@/components/ui/button';
|
||||
|
||||
export default function EducationPlatform() {
|
||||
const { user } = useAuth();
|
||||
const { selectedAccount } = usePolkadot();
|
||||
const { selectedAccount } = usePezkuwi();
|
||||
const [enrollments, setEnrollments] = useState<Enrollment[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [activeTab, setActiveTab] = useState('courses');
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Scale,
|
||||
Building,
|
||||
} from 'lucide-react';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { LoadingState } from '@pezkuwi/components/AsyncComponent';
|
||||
import {
|
||||
@@ -50,7 +50,7 @@ import {
|
||||
// import { web3FromAddress } from '@pezkuwi/extension-dapp';
|
||||
|
||||
export default function Elections() {
|
||||
const { api, isApiReady } = usePolkadot();
|
||||
const { api, isApiReady } = usePezkuwi();
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [elections, setElections] = useState<ElectionInfo[]>([]);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import Layout from '@/components/Layout';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -64,7 +64,7 @@ interface NetworkStats {
|
||||
|
||||
const Explorer: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const { api, isApiReady } = usePolkadot();
|
||||
const { api, isApiReady } = usePezkuwi();
|
||||
|
||||
const [stats, setStats] = useState<NetworkStats>({
|
||||
bestBlock: 0,
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
|
||||
export default function GovEntrance() {
|
||||
// usePolkadot removed
|
||||
// usePezkuwi removed
|
||||
const { nftDetails, kycStatus, loading: dashboardLoading } = useDashboard();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
@@ -16,7 +16,7 @@ import { useTranslation } from 'react-i18next';
|
||||
const Login: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { connectWallet, selectedAccount } = usePolkadot();
|
||||
const { connectWallet, selectedAccount } = usePezkuwi();
|
||||
const { signIn, signUp } = useAuth();
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
const [rememberMe, setRememberMe] = useState(false);
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
Star,
|
||||
} from 'lucide-react';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { toast } from 'sonner';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import {
|
||||
@@ -73,7 +73,7 @@ export default function P2PTrade() {
|
||||
const { tradeId } = useParams<{ tradeId: string }>();
|
||||
const navigate = useNavigate();
|
||||
const { user } = useAuth();
|
||||
const { api, selectedAccount } = usePolkadot();
|
||||
const { api, selectedAccount } = usePezkuwi();
|
||||
|
||||
const [trade, setTrade] = useState<TradeWithDetails | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useWallet } from '@/contexts/WalletContext';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -12,7 +12,7 @@ import { toast } from 'sonner';
|
||||
|
||||
export default function Presale() {
|
||||
const { t } = useTranslation();
|
||||
const { api, selectedAccount, isApiReady } = usePolkadot();
|
||||
const { api, selectedAccount, isApiReady } = usePezkuwi();
|
||||
const { balances } = useWallet();
|
||||
|
||||
const [wusdtAmount, setWusdtAmount] = useState('');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { AccountBalance } from '@/components/AccountBalance';
|
||||
import { TransferModal } from '@/components/TransferModal';
|
||||
import { ReceiveModal } from '@/components/ReceiveModal';
|
||||
@@ -24,7 +24,7 @@ interface Transaction {
|
||||
|
||||
const WalletDashboard: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const { api, isApiReady, selectedAccount } = usePolkadot();
|
||||
const { api, isApiReady, selectedAccount } = usePezkuwi();
|
||||
const [isTransferModalOpen, setIsTransferModalOpen] = useState(false);
|
||||
const [isReceiveModalOpen, setIsReceiveModalOpen] = useState(false);
|
||||
const [isHistoryModalOpen, setIsHistoryModalOpen] = useState(false);
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Textarea } from '@/components/ui/textarea';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { useDashboard } from '@/contexts/DashboardContext';
|
||||
import {
|
||||
@@ -86,7 +86,7 @@ interface LegislationProposal {
|
||||
}
|
||||
|
||||
export default function CitizensIssues() {
|
||||
const { api, isApiReady, selectedAccount } = usePolkadot();
|
||||
const { api, isApiReady, selectedAccount } = usePezkuwi();
|
||||
const {} = useAuth();
|
||||
const {} = useDashboard();
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useDashboard } from '@/contexts/DashboardContext';
|
||||
import {
|
||||
ArrowLeft,
|
||||
@@ -79,7 +79,7 @@ const GOVERNMENT_AUTHORIZED_TIKIS = [
|
||||
];
|
||||
|
||||
export default function GovernmentEntrance() {
|
||||
const { api, isApiReady, selectedAccount } = usePolkadot();
|
||||
const { api, isApiReady, selectedAccount } = usePezkuwi();
|
||||
const { nftDetails, loading: dashboardLoading } = useDashboard();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -12,7 +12,7 @@ import { ArrowLeft, Loader2, AlertCircle, Rocket } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
export default function CreatePresale() {
|
||||
const { api, selectedAccount } = usePolkadot();
|
||||
const { api, selectedAccount } = usePezkuwi();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [creating, setCreating] = useState(false);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useWallet } from '@/contexts/WalletContext';
|
||||
import { useParams, useNavigate } from 'react-router-dom';
|
||||
import { Card } from '@/components/ui/card';
|
||||
@@ -38,7 +38,7 @@ interface PresaleData {
|
||||
|
||||
export default function PresaleDetail() {
|
||||
const { id } = useParams();
|
||||
const { api, selectedAccount, isApiReady } = usePolkadot();
|
||||
const { api, selectedAccount, isApiReady } = usePezkuwi();
|
||||
const { balances } = useWallet();
|
||||
const navigate = useNavigate();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { usePolkadot } from '@/contexts/PolkadotContext';
|
||||
import { usePezkuwi } from '@/contexts/PezkuwiContext';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -29,7 +29,7 @@ interface PresaleInfo {
|
||||
|
||||
export default function PresaleList() {
|
||||
const { t } = useTranslation();
|
||||
const { api, isApiReady } = usePolkadot();
|
||||
const { api, isApiReady } = usePezkuwi();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [presales, setPresales] = useState<PresaleInfo[]>([]);
|
||||
|
||||
Reference in New Issue
Block a user