Skip to content

Commit ccab82e

Browse files
committed
fix: source profile data from npm
1 parent 7f1e259 commit ccab82e

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

app/pages/~[username]/index.vue

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,13 @@ const debouncedUpdateUrl = debounce((filter: string, sort: string) => {
3232
updateUrl({ filter, sort })
3333
}, 300)
3434
35-
// Load all results when user starts filtering/sorting (so client-side filter works on full set)
35+
// Update URL when filter/sort changes (debounced)
3636
watch([filterText, sortOption], ([filter, sort]) => {
37-
if (filter !== '' || sort !== 'downloads') {
38-
loadAll()
39-
}
4037
debouncedUpdateUrl(filter, sort)
4138
})
4239
43-
// Fetch packages (composable manages pagination & provider dispatch internally)
44-
const {
45-
data: results,
46-
status,
47-
error,
48-
isLoadingMore,
49-
hasMore,
50-
loadMore,
51-
loadAll,
52-
pageSize,
53-
} = useUserPackages(username)
40+
// Fetch packages — reuses the org endpoint which accepts usernames too
41+
const { data: results, status, error } = useOrgPackages(username)
5442
5543
// Get initial page from URL (for scroll restoration on reload)
5644
const initialPage = computed(() => {
@@ -217,11 +205,7 @@ defineOgImageComponent('Default', {
217205
<PackageList
218206
v-else
219207
:results="filteredAndSortedPackages"
220-
:has-more="hasMore"
221-
:is-loading="isLoadingMore"
222-
:page-size="pageSize"
223208
:initial-page="initialPage"
224-
@load-more="loadMore"
225209
@page-change="handlePageChange"
226210
/>
227211
</section>

0 commit comments

Comments
 (0)