Skip to content

Commit

Permalink
bugfix: Created a local helper to render $ character (can't be parsed…
Browse files Browse the repository at this point in the history
… by ember-template-imports@v4.1.0)
  • Loading branch information
ijlee2 committed Apr 22, 2024
1 parent bd47fb2 commit 636cc5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs-app/app/components/products/product/card.gts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import type { Product } from '../../../data';
import styles from './card.css';
import ProductsProductImage from './image';

function formatPrice(price: number): string {
return `$${price}`;
}

interface ProductsProductCardSignature {
Args: {
product: Product;
Expand Down Expand Up @@ -41,7 +45,7 @@ const ProductsProductCardComponent: TOC<ProductsProductCardSignature> =
</p>

<p class={{styles.price}} data-test-field="Price">
\${{@product.price}}
{{formatPrice @product.price}}
</p>
</div>

Expand Down

0 comments on commit 636cc5a

Please sign in to comment.