Skip to content

Commit

Permalink
fix(sample)
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Selman <[email protected]>
  • Loading branch information
dselman committed Jul 14, 2023
1 parent d5e178c commit bcbf1b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ const INITIAL_TEMPLATE = `### Welcome {{name}}!
- Your monthly salary is {{salary as "0,0.00 CCC"}}
- Your favorite colours are {{#join favoriteColors}}
## Orders
{{#clause order}}
## Orders
Your last order was placed {{createdAt as "D MMMM YYYY"}} ({{% return now.diff(order.createdAt, 'day')%}} days ago).
{{#ulist orderLines}}
- {{quantity}}x _{{sku}}_ @ £{{price as "0,0.00"}}
{{/ulist}}
{{/clause}}
Order total: {{% return '£' + order.orderLines.map(ol => ol.price).reduce((sum, cur) => sum + cur);%}}
{{/clause}}
Thank you.
`;
Expand Down

0 comments on commit bcbf1b9

Please sign in to comment.