tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
Add loading skeleton to NowPlayings
tsiry-sandratraina.com
1 month ago
86692b90
baf6ff9d
+45
1 changed file
expand all
collapse all
unified
split
apps
web
src
pages
home
nowplayings
NowPlayings.tsx
+45
apps/web/src/pages/home/nowplayings/NowPlayings.tsx
···
12
12
import { useNowPlayingsQuery } from "../../../hooks/useNowPlaying";
13
13
import styles, { getModalStyles } from "./styles";
14
14
import _ from "lodash";
15
15
+
import ContentLoader from "react-content-loader";
15
16
16
17
dayjs.extend(relativeTime);
17
18
dayjs.extend(utc);
···
237
238
scrollbar-width: none;
238
239
}
239
240
`}</style>
241
241
+
242
242
+
{isLoading && (
243
243
+
<div className="flex overflow-x-hidden">
244
244
+
<ContentLoader
245
245
+
width="100%"
246
246
+
height={100}
247
247
+
viewBox="0 0 800 100"
248
248
+
backgroundColor="var(--color-skeleton-background)"
249
249
+
foregroundColor="var(--color-skeleton-foreground)"
250
250
+
>
251
251
+
{/* Story 1 */}
252
252
+
<circle cx="40" cy="40" r="32" />
253
253
+
<rect x="16" y="85" rx="3" ry="3" width="48" height="10" />
254
254
+
255
255
+
{/* Story 2 */}
256
256
+
<circle cx="140" cy="40" r="32" />
257
257
+
<rect x="116" y="85" rx="3" ry="3" width="48" height="10" />
258
258
+
259
259
+
{/* Story 3 */}
260
260
+
<circle cx="240" cy="40" r="32" />
261
261
+
<rect x="216" y="85" rx="3" ry="3" width="48" height="10" />
262
262
+
263
263
+
{/* Story 4 */}
264
264
+
<circle cx="340" cy="40" r="32" />
265
265
+
<rect x="316" y="85" rx="3" ry="3" width="48" height="10" />
266
266
+
267
267
+
{/* Story 5 */}
268
268
+
<circle cx="440" cy="40" r="32" />
269
269
+
<rect x="416" y="85" rx="3" ry="3" width="48" height="10" />
270
270
+
271
271
+
{/* Story 6 */}
272
272
+
<circle cx="540" cy="40" r="32" />
273
273
+
<rect x="516" y="85" rx="3" ry="3" width="48" height="10" />
274
274
+
275
275
+
{/* Story 7 */}
276
276
+
<circle cx="640" cy="40" r="32" />
277
277
+
<rect x="616" y="85" rx="3" ry="3" width="48" height="10" />
278
278
+
279
279
+
{/* Story 8 */}
280
280
+
<circle cx="740" cy="40" r="32" />
281
281
+
<rect x="716" y="85" rx="3" ry="3" width="48" height="10" />
282
282
+
</ContentLoader>
283
283
+
</div>
284
284
+
)}
240
285
241
286
{!isLoading && (
242
287
<>