Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Event Images Not Loading #201

Merged
merged 2 commits into from
Dec 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/components/stats/jacob/recents.svelte
Original file line number Diff line number Diff line change
@@ -14,9 +14,6 @@
<div class="flex flex-col">
<h1 class="text-2xl my-1">Recent Contests</h1>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 w-full">
{#if recentContests.length < 1}
<h1 class="text-lg">No recent contests found.</h1>
{/if}
{#each recentContests as contest, i (`${contest.crop}${contest.timestamp}`)}
{#if i < 3 || (showMore && i < 9)}
<div class="block">
@@ -36,15 +33,19 @@
</div>
{/if}
{/each}
<a
href={$page.url.pathname + '/contests'}
data-sveltekit-preload-data="off"
class="p-2 flex flex-row items-center justify-center hover:shadow-lg hover:bg-gray-200 dark:hover:bg-zinc-700 gap-0.5 rounded-md bg-gray-100 dark:bg-zinc-800 border-l-4 dark:border-zinc-700"
>
<h3 class="text-lg font-semibold flex flex-row items-center gap-2">
View all
<ArrowUpRightFromSquareOutline />
</h3>
</a>
{#if recentContests.length > 0}
<a
href={$page.url.pathname + '/contests'}
data-sveltekit-preload-data="off"
class="p-2 flex flex-row items-center justify-center hover:shadow-lg hover:bg-gray-200 dark:hover:bg-zinc-700 gap-0.5 rounded-md bg-gray-100 dark:bg-zinc-800 border-l-4 dark:border-zinc-700"
>
<h3 class="text-lg font-semibold flex flex-row items-center gap-2">
View all
<ArrowUpRightFromSquareOutline />
</h3>
</a>
{:else}
<p class="text-lg">No contests found.</p>
{/if}
</div>
</div>
2 changes: 1 addition & 1 deletion src/routes/browse/+page.svelte
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<h1 class="text-4xl">Join Public Events</h1>
<p class="text-xl my-4">Join Farming Weight Events!</p>
{#each events ?? [] as event (event.id)}
<Event {event} guild={guilds.find((g) => g.id === event.guildId)} />
<Event {event} guild={data.guilds?.find((g) => g.id === event.guildId)} />
{/each}
</section>
{/if}