mirror of
https://github.com/zschaffer/rating-room.git
synced 2024-06-18 15:07:05 +00:00
use product name for sidebar links
This commit is contained in:
parent
161a016527
commit
b27b8725be
|
@ -1,6 +1,7 @@
|
|||
<script>
|
||||
export let productsView;
|
||||
export let currentProduct;
|
||||
import { parseName } from '$helpers/parse';
|
||||
|
||||
const { container, productStyle, productTitle } = {
|
||||
container: 'pt-4',
|
||||
|
@ -12,7 +13,7 @@
|
|||
|
||||
<div class={container}>
|
||||
{#each productsView as product}
|
||||
<a class={productStyle} on:click={currentProduct.set(product)} href="/product">
|
||||
<a class={productStyle} on:click={currentProduct.set(product)} href={parseName(product.name)}>
|
||||
<p
|
||||
class={`pl-12 hover:bg-blue-300 ${
|
||||
$currentProduct.name === product.name ? 'bg-blue-300' : ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user