Download src/config/data.ts from SherlockHolmes786/tradewithlive: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/SherlockHolmes786/tradewithlive/resolve/main/src/config/data.ts
- Command line
-
hf download hf://SherlockHolmes786/tradewithlive/src/config/data.ts
-
curl -L -o data.ts https://huggingface.co/SherlockHolmes786/tradewithlive/resolve/main/src/config/data.ts
1.15 kB
| import { Influencer } from '../types'; | |
| // Get all influencers from localStorage (approved ones only) | |
| export const getInfluencers = (): Influencer[] => { | |
| try { | |
| const approvedInfluencers = JSON.parse(localStorage.getItem('approved_influencers') || '[]'); | |
| // Convert approved registrations to Influencer format | |
| const approvedAsInfluencers: Influencer[] = approvedInfluencers.map((reg: any) => ({ | |
| id: reg.id, | |
| name: reg.name, | |
| avatar: reg.avatar || reg.name.charAt(0).toUpperCase(), | |
| bio: reg.bio || '', | |
| socialLinks: reg.socialLinks?.twitter || reg.socialLinks?.youtube || '', | |
| isPrivate: reg.isPrivate, | |
| accessCode: reg.accessCode || '', | |
| stats: { | |
| winRate: 0, | |
| totalPnlPercent: 0, | |
| activePositions: 0, | |
| netWorthAllocation: '$0' | |
| } | |
| })); | |
| return approvedAsInfluencers; | |
| } catch (error) { | |
| console.error('Error loading approved influencers:', error); | |
| return []; | |
| } | |
| }; | |
| // Empty array for backward compatibility | |
| export const influencers: Influencer[] = []; | |
| // Empty initial data object | |
| export const initialData: Record<string, any> = {}; | |