Skip to content

Commit

Permalink
fix some errors in dogshit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcat101 committed Jan 30, 2024
1 parent 353d1cf commit cfbec15
Showing 1 changed file with 36 additions and 25 deletions.
61 changes: 36 additions & 25 deletions src/routes/s/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,19 @@
<div class="flex flex-col gap-2">
<Author author={queryParams.author} c={filteredAuthor.length} />
{#if largeScreen}
<PackageList
p={resultedFilter}
showAvatar={!queryParams.author}
showName={!queryParams.author}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}
<div class="grid grid-cols-2 gap-2">
<PackageList
p={resultedFilter}
showAvatar={!queryParams.author}
showName={!queryParams.author}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}

maxCount={orgs.length-1}
customHeight={5.7}
/>
maxCount={Math.max(orgs.length-1, 0)}
customHeight={5.7}
/>
</div>
{/if}
</div>
{#if orgs.length>0}
Expand Down Expand Up @@ -265,27 +267,36 @@
class:md:grid-cols-2={$userPreferencesStore.compact}
class:lg:grid-cols-3={$userPreferencesStore.compact}
>
{#await getNonEmptyOrgsWithPackageCount('Gcat101', $ghApiKeyStore)}
<PackageList
p={resultedFilter}
showAvatar={!queryParams.author}
showName={!queryParams.author}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}
/>
{:then orgs}
{#if queryParams.author!=null}
{#await getNonEmptyOrgsWithPackageCount(queryParams.author, $ghApiKeyStore)}
<PackageList
p={resultedFilter}
showAvatar={false}
showName={false}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}
/>
{:then orgs}
<PackageList
p={resultedFilter}
showAvatar={false}
showName={false}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}

startFrom={largeScreen && orgs.length>0 ? orgs.length-1 : 0}
/>
{/await}
{:else}
<PackageList
p={resultedFilter}
showAvatar={!queryParams.author}
showName={!queryParams.author}
showDetails={queryParams._details == 'i'}
sortBy={$userPreferencesStore.sortBy}
compact={$userPreferencesStore.compact}

startFrom={largeScreen && orgs.length>0 ? orgs.length-1 : 0}
/>
{/await}
{/if}
</dl>
{:else if state == 'fail'}
<p>Something went wrong</p>
Expand Down

0 comments on commit cfbec15

Please sign in to comment.