goPreview(deck.id)} onkeydown={(e) => e.key === 'Enter' && goPreview(deck.id)}>
{deck.title}
{#if deck.description}
@@ -193,21 +198,29 @@
-
openRatingModal(deck, e) : undefined}
- role={userId && deck.owner_id !== userId ? 'button' : undefined}
- tabindex={userId && deck.owner_id !== userId ? 0 : undefined}
- onkeydown={userId && deck.owner_id !== userId ? (e) => e.key === 'Enter' && openRatingModal(deck, e) : undefined}
- >
- {['★', '★', '★', '★', '★'].map((_, i) => (i < Math.round(deck.average_rating ?? 0) ? '★' : '☆')).join('')}
- {formatRating(deck.average_rating ?? 0)}
- {#if (deck.rating_count ?? 0) > 0}
- ({deck.rating_count})
- {/if}
-
+ {#if userId && deck.owner_id !== userId}
+
+ {:else}
+
+ {['★', '★', '★', '★', '★'].map((_, i) => (i < Math.round(deck.average_rating ?? 0) ? '★' : '☆')).join('')}
+ {formatRating(deck.average_rating ?? 0)}
+ {#if (deck.rating_count ?? 0) > 0}
+ ({deck.rating_count})
+ {/if}
+
+ {/if}
{#if !deck.user_has_this}