prettier fix

This commit is contained in:
Danel Kungla
2025-09-19 17:22:36 +03:00
parent efa94b3322
commit 0c2cfe6d18
509 changed files with 17988 additions and 9920 deletions

View File

@@ -1,6 +1,6 @@
"use server"
'use server';
import { applyPromotions } from "@lib/data/cart"
import { applyPromotions } from '@lib/data/cart';
export async function addPromotionCodeAction(code: string) {
try {
@@ -12,9 +12,14 @@ export async function addPromotionCodeAction(code: string) {
}
}
export async function removePromotionCodeAction(codeToRemove: string, appliedCodes: string[]) {
export async function removePromotionCodeAction(
codeToRemove: string,
appliedCodes: string[],
) {
try {
const updatedCodes = appliedCodes.filter((appliedCode) => appliedCode !== codeToRemove);
const updatedCodes = appliedCodes.filter(
(appliedCode) => appliedCode !== codeToRemove,
);
await applyPromotions(updatedCodes);
return { success: true, message: 'Discount code removed successfully' };
} catch (error) {