diff --git a/apps/mobile/src/components/Avatar.tsx b/apps/mobile/src/components/Avatar.tsx index 8a0ee0c8..b5d1fb0e 100644 --- a/apps/mobile/src/components/Avatar.tsx +++ b/apps/mobile/src/components/Avatar.tsx @@ -10,7 +10,7 @@ type Props = { }; export const Avatar: React.FC = ({ uri, name = 'D', size = 56, style }) => { - const initials = name.charAt(0).toUpperCase(); + const initials = name[0].toUpperCase(); const imageStyle = [{ width: size, height: size, borderRadius: size / 2 } as ImageStyle, style as ImageStyle]; const placeholderStyle = [{ width: size, height: size, borderRadius: size / 2, backgroundColor: COLORS.primary }, style as ViewStyle]; diff --git a/apps/mobile/src/screens/DevCardViewScreen.tsx b/apps/mobile/src/screens/DevCardViewScreen.tsx index 3698c862..56bb2702 100644 --- a/apps/mobile/src/screens/DevCardViewScreen.tsx +++ b/apps/mobile/src/screens/DevCardViewScreen.tsx @@ -453,7 +453,7 @@ export default function DevCardViewScreen({ navigation, route }: Props) { ) : ( - {PLATFORM_EMOJI[link.platform] || platform?.name.charAt(0) || '?'} + {PLATFORM_EMOJI[link.platform] || platform?.name[0] || '?'} )} diff --git a/apps/web/src/pages/CardPage.tsx b/apps/web/src/pages/CardPage.tsx index 690ce574..d54c7b6a 100644 --- a/apps/web/src/pages/CardPage.tsx +++ b/apps/web/src/pages/CardPage.tsx @@ -104,7 +104,7 @@ export default function CardPage() { className="card-avatar-placeholder" style={{ background: card.owner.accentColor || '#6366F1' }} > - {card.owner.displayName.charAt(0).toUpperCase()} + {card.owner.displayName[0].toUpperCase()} )} @@ -143,7 +143,7 @@ export default function CardPage() { id={`platform-tile-${link.platform}`} >
- {link.platform.charAt(0).toUpperCase()} + {link.platform[0].toUpperCase()}
{link.platform} diff --git a/apps/web/src/pages/ProfilePage.tsx b/apps/web/src/pages/ProfilePage.tsx index 94a84f54..abc4286a 100644 --- a/apps/web/src/pages/ProfilePage.tsx +++ b/apps/web/src/pages/ProfilePage.tsx @@ -126,7 +126,7 @@ export default function ProfilePage() { className="avatar avatar-placeholder" style={{ background: profile.accentColor }} > - {profile.displayName.charAt(0).toUpperCase()} + {profile.displayName[0].toUpperCase()}
)}
@@ -157,7 +157,7 @@ export default function ProfilePage() { >
- {platform?.name.charAt(0) || '?'} + {platform?.name[0] || '?'}