mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-13 20:21:01 +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:
+15
-1
@@ -1,6 +1,20 @@
|
||||
import { toast } from 'sonner';
|
||||
|
||||
const PINATA_JWT = import.meta.env.VITE_PINATA_JWT;
|
||||
// Helper to get environment variables that works in both web (Vite) and React Native (Expo)
|
||||
const getEnv = (key: string): string | undefined => {
|
||||
// Check for Vite environment (web)
|
||||
if (typeof import.meta !== 'undefined' && import.meta.env) {
|
||||
return (import.meta.env as any)[key];
|
||||
}
|
||||
// Check for Expo environment (React Native)
|
||||
if (typeof process !== 'undefined' && process.env) {
|
||||
const expoKey = key.replace('VITE_', 'EXPO_PUBLIC_');
|
||||
return process.env[expoKey] || process.env[key];
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const PINATA_JWT = getEnv('VITE_PINATA_JWT');
|
||||
const PINATA_API = 'https://api.pinata.cloud/pinning/pinFileToIPFS';
|
||||
|
||||
export async function uploadToIPFS(file: File): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user