Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/mobile/src/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
};

export const Avatar: React.FC<Props> = ({ 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];

Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/screens/DevCardViewScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export default function DevCardViewScreen({ navigation, route }: Props) {
description="This DevCard profile does not have any platform links available."
/>
</View>
) : profile.links.map(link => {
) : profile.(links ?? []).map(link => {
const platform = PLATFORMS[link.platform];
const state = followStates[link.id] || 'idle';
const btnColor = getButtonColor(link, state);
Expand Down Expand Up @@ -453,7 +453,7 @@ export default function DevCardViewScreen({ navigation, route }: Props) {
<Text style={styles.tileIconDoneText}>✓</Text>
) : (
<Text style={[styles.tileIconText, { color: platform?.color || COLORS.white }]}>
{PLATFORM_EMOJI[link.platform] || platform?.name.charAt(0) || '?'}
{PLATFORM_EMOJI[link.platform] || platform?.name[0] || '?'}
</Text>
)}
</View>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/pages/CardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
</div>
)}
</div>
Expand Down Expand Up @@ -134,7 +134,7 @@ export default function CardPage() {
<div className="action-section" id="card-connections">
<h2>Connections</h2>
<div className="platform-grid">
{card.links.map((link) => (
{card.(links ?? []).map((link) => (
<button
key={link.id}
className="platform-tile"
Expand All @@ -143,7 +143,7 @@ export default function CardPage() {
id={`platform-tile-${link.platform}`}
>
<div className="tile-icon-card">
{link.platform.charAt(0).toUpperCase()}
{link.platform[0].toUpperCase()}
</div>
<div className="tile-info">
<span className="platform-name-card">{link.platform}</span>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
</div>
)}
<div className="avatar-glow" style={{ background: profile.accentColor }} />
Expand All @@ -142,7 +142,7 @@ export default function ProfilePage() {
</header>

<div className="links-grid" id="profile-links">
{profile.links.map((link, i) => {
{profile.(links ?? []).map((link, i) => {
const platform = PLATFORMS[link.platform];
const color = platformColors[link.platform] || '#6366f1';
return (
Expand All @@ -157,7 +157,7 @@ export default function ProfilePage() {
>
<div className="tile-icon" style={{ background: color }}>
<span className="platform-initial">
{platform?.name.charAt(0) || '?'}
{platform?.name[0] || '?'}
</span>
</div>
<div className="tile-content">
Expand Down
Loading