nsarrazin HF Staff commited on
Commit
9f3980a
·
1 Parent(s): d197607

fix: layout bug in tools page in SSR

Browse files
Files changed (1) hide show
  1. src/routes/tools/+page.svelte +6 -3
src/routes/tools/+page.svelte CHANGED
@@ -232,8 +232,11 @@
232
  {#each tools as tool}
233
  {@const isActive = ($page.data.settings?.tools ?? []).includes(tool._id.toString())}
234
  {@const isOfficial = !tool.createdByName}
235
- <a
236
- href="{base}/tools/{tool._id.toString()}"
 
 
 
237
  class="relative flex flex-row items-center gap-4 overflow-hidden text-balance rounded-xl border bg-gray-50/50 px-4 text-center shadow hover:bg-gray-50 hover:shadow-inner dark:bg-gray-950/20 dark:hover:bg-gray-950/40 max-sm:px-4 sm:h-24 {!(
238
  tool.review === ReviewStatus.APPROVED
239
  ) && !isOfficial
@@ -284,7 +287,7 @@
284
  </p>
285
  {/if}
286
  </div>
287
- </a>
288
  {:else}
289
  {#if activeOnly}
290
  You don't have any active tools.
 
232
  {#each tools as tool}
233
  {@const isActive = ($page.data.settings?.tools ?? []).includes(tool._id.toString())}
234
  {@const isOfficial = !tool.createdByName}
235
+ <div
236
+ on:click={() => goto(`${base}/tools/${tool._id.toString()}`)}
237
+ on:keydown={(e) => e.key === "Enter" && goto(`${base}/tools/${tool._id.toString()}`)}
238
+ role="button"
239
+ tabindex="0"
240
  class="relative flex flex-row items-center gap-4 overflow-hidden text-balance rounded-xl border bg-gray-50/50 px-4 text-center shadow hover:bg-gray-50 hover:shadow-inner dark:bg-gray-950/20 dark:hover:bg-gray-950/40 max-sm:px-4 sm:h-24 {!(
241
  tool.review === ReviewStatus.APPROVED
242
  ) && !isOfficial
 
287
  </p>
288
  {/if}
289
  </div>
290
+ </div>
291
  {:else}
292
  {#if activeOnly}
293
  You don't have any active tools.