style: fix prefer-const and prettier formatting issues
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
let giftCardAmount = $state('25');
|
||||
let showGiftCardInput = $state(false);
|
||||
|
||||
let subtotal = $derived(cart.reduce((sum, item) => sum + item.price * item.qty, 0));
|
||||
let itemCount = $derived(cart.reduce((sum, item) => sum + item.qty, 0));
|
||||
const subtotal = $derived(cart.reduce((sum, item) => sum + item.price * item.qty, 0));
|
||||
const itemCount = $derived(cart.reduce((sum, item) => sum + item.qty, 0));
|
||||
|
||||
function formatCurrency(n: number): string {
|
||||
return new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'GBP' }).format(n);
|
||||
|
||||
Reference in New Issue
Block a user