tangled
alpha
login
or
join now
rocksky.app
/
rocksky
96
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
96
fork
atom
overview
issues
7
pulls
pipelines
Add optional chaining to avatar checks
tsiry-sandratraina.com
1 month ago
385e93b9
cb70bd32
+4
-4
2 changed files
expand all
collapse all
unified
split
apps
web
src
components
Handle
Handle.tsx
pages
home
feed
Feed.tsx
+2
-2
apps/web/src/components/Handle/Handle.tsx
···
176
176
<div className="flex flex-row items-start justify-between">
177
177
<div className="flex flex-row items-center">
178
178
<Link to={link} className="no-underline">
179
179
-
{!profiles[did]?.avatar.endsWith("/@jpeg") && (
179
179
+
{!profiles[did]?.avatar?.endsWith("/@jpeg") && (
180
180
<Avatar
181
181
src={profiles[did]?.avatar}
182
182
name={profiles[did]?.displayName}
183
183
size={"60px"}
184
184
/>
185
185
)}
186
186
-
{profiles[did]?.avatar.endsWith("/@jpeg") && (
186
186
+
{profiles[did]?.avatar?.endsWith("/@jpeg") && (
187
187
<div className="w-[60px] h-[60px] rounded-full bg-[var(--color-avatar-background)] flex items-center justify-center">
188
188
<IconUser size={30} color="#fff" />
189
189
</div>
+2
-2
apps/web/src/pages/home/feed/Feed.tsx
···
220
220
221
221
<div className="flex">
222
222
<div className="mr-[8px]">
223
223
-
{!song.userAvatar.endsWith("/@jpeg") && (
223
223
+
{!song.userAvatar?.endsWith("/@jpeg") && (
224
224
<Avatar
225
225
src={song.userAvatar}
226
226
name={song.userDisplayName}
227
227
size={"20px"}
228
228
/>
229
229
)}
230
230
-
{song.userAvatar.endsWith("/@jpeg") && (
230
230
+
{song.userAvatar?.endsWith("/@jpeg") && (
231
231
<div className="w-[20px] h-[20px] rounded-full bg-[var(--color-avatar-background)] flex items-center justify-center">
232
232
<IconUser size={10} color="#fff" />
233
233
</div>