mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
fixed infinite scroll skeleton switching/loading bug
This commit is contained in:
1 parent
a2c5c2c484
commit
f062eabd8a
3 files changed
+4
-4
No files matched your search
@@ -37,7 +37,7 @@ export default function FeaturedTab() {
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{ media.isLoading ? (
|
||||
{ media.isLoading && !media.list.length ? (
|
||||
<div className="row gx-3 gy-3">
|
||||
{Array.from({ length: 12 }).map((_, index) => (
|
||||
<SkeletonCard key={index} />
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function MediaTab() {
|
||||
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
|
||||
const [list, listSet] = useState<MediaFile[]>([]);
|
||||
const media = useLazyLists({
|
||||
debug: "aaaa",
|
||||
debug: "explore media tab",
|
||||
fetcher: ListMediaFiles,
|
||||
list,
|
||||
listSet,
|
||||
@@ -69,7 +69,7 @@ export default function MediaTab() {
|
||||
</div>
|
||||
</div>
|
||||
<AudioPlayerProvider>
|
||||
{ media.isLoading ? (
|
||||
{ media.isLoading && !media.list.length ? (
|
||||
<div className="row gx-3 gy-3">
|
||||
{Array.from({ length: 12 }).map((_, index) => (
|
||||
<SkeletonCard key={index} />
|
||||
|
||||
@@ -106,7 +106,7 @@ export default function WeightsTab() {
|
||||
</div>
|
||||
</div>
|
||||
<AudioPlayerProvider>
|
||||
{ weights.isLoading ? (
|
||||
{ weights.isLoading && !weights.list.length ? (
|
||||
<div className="row gx-3 gy-3">
|
||||
{Array.from({ length: 12 }).map((_, index) => (
|
||||
<SkeletonCard key={index} />
|
||||
|
||||
Reference in new issue
Block a user