create-brainerce-store 1.50.5 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/dist/index.js +146 -100
- package/messages/en.json +36 -1
- package/messages/he.json +36 -1
- package/package.json +1 -1
- package/templates/nextjs/base/.claude/commands/design.md +60 -0
- package/templates/nextjs/base/.env.local.ejs +5 -0
- package/templates/nextjs/base/.eslintrc.json +57 -3
- package/templates/nextjs/base/AGENTS.md +41 -0
- package/templates/nextjs/base/AI-GUIDE.md +143 -0
- package/templates/nextjs/base/CLAUDE.md +52 -0
- package/templates/nextjs/base/TRANSLATIONS.md +1 -1
- package/templates/nextjs/base/next.config.ts +2 -2
- package/templates/nextjs/base/package.json.ejs +52 -39
- package/templates/nextjs/base/src/app/account/page.tsx +5 -5
- package/templates/nextjs/base/src/app/api/auth/logout/route.ts +1 -1
- package/templates/nextjs/base/src/app/api/auth/reset-password/route.ts +2 -2
- package/templates/nextjs/base/src/app/api/store/[...path]/route.ts +1 -1
- package/templates/nextjs/base/src/app/auth/callback/page.tsx +4 -4
- package/templates/nextjs/base/src/app/blog/[slug]/page.tsx.ejs +4 -4
- package/templates/nextjs/base/src/app/blog/page.tsx.ejs +2 -2
- package/templates/nextjs/base/src/app/cart/page.tsx +2 -173
- package/templates/nextjs/base/src/app/checkout/page.tsx +12 -11
- package/templates/nextjs/base/src/app/contact/page.tsx +3 -3
- package/templates/nextjs/base/src/app/faq/page.tsx.ejs +2 -2
- package/templates/nextjs/base/src/app/forgot-password/page.tsx +4 -4
- package/templates/nextjs/base/src/app/globals.css +36 -30
- package/templates/nextjs/base/src/app/layout.tsx.ejs +12 -12
- package/templates/nextjs/base/src/app/login/page.tsx +4 -4
- package/templates/nextjs/base/src/app/order-confirmation/page.tsx +19 -12
- package/templates/nextjs/base/src/app/page.tsx +4 -4
- package/templates/nextjs/base/src/app/pages/[slug]/page.tsx.ejs +3 -3
- package/templates/nextjs/base/src/app/payment-complete/page.tsx +1 -1
- package/templates/nextjs/base/src/app/products/[slug]/page.tsx +6 -6
- package/templates/nextjs/base/src/app/products/page.tsx +4 -623
- package/templates/nextjs/base/src/app/register/page.tsx +4 -4
- package/templates/nextjs/base/src/app/reset-password/page.tsx +5 -5
- package/templates/nextjs/base/src/app/sitemap.ts +1 -1
- package/templates/nextjs/base/src/app/verify-email/page.tsx +5 -5
- package/templates/nextjs/base/src/components/account/address-book.tsx +3 -3
- package/templates/nextjs/base/src/components/account/order-customizations.tsx +3 -3
- package/templates/nextjs/base/src/components/account/order-history.tsx +13 -5
- package/templates/nextjs/base/src/components/account/order-payment-block.tsx +2 -2
- package/templates/nextjs/base/src/components/account/order-shipping-block.tsx +2 -2
- package/templates/nextjs/base/src/components/account/order-status-timeline.tsx +2 -2
- package/templates/nextjs/base/src/components/account/profile-section.tsx +3 -3
- package/templates/nextjs/base/src/components/auth/login-form.tsx +4 -4
- package/templates/nextjs/base/src/components/auth/oauth-buttons.tsx +4 -4
- package/templates/nextjs/base/src/components/auth/register-form.tsx +4 -4
- package/templates/nextjs/base/src/components/brainerce-bot.tsx +2 -2
- package/templates/nextjs/base/src/components/checkout/checkout-form.tsx +24 -3
- package/templates/nextjs/base/src/components/checkout/custom-fields-step.tsx +2 -2
- package/templates/nextjs/base/src/components/checkout/delivery-method-step.tsx +2 -2
- package/templates/nextjs/base/src/components/checkout/order-bump-card.tsx +4 -4
- package/templates/nextjs/base/src/components/checkout/payment-step.tsx +20 -16
- package/templates/nextjs/base/src/components/checkout/pickup-step.tsx +3 -3
- package/templates/nextjs/base/src/components/checkout/shipping-step.tsx +3 -3
- package/templates/nextjs/base/src/components/checkout/tax-display.tsx +3 -3
- package/templates/nextjs/base/src/components/seo/organization-json-ld.tsx +2 -2
- package/templates/nextjs/base/src/components/seo/product-json-ld.tsx +3 -3
- package/templates/nextjs/base/src/components/ui/accordion.tsx +53 -0
- package/templates/nextjs/base/src/components/ui/badge.tsx +32 -0
- package/templates/nextjs/base/src/components/ui/button.tsx +49 -0
- package/templates/nextjs/base/src/components/ui/card.tsx +55 -0
- package/templates/nextjs/base/src/components/ui/checkbox.tsx +28 -0
- package/templates/nextjs/base/src/components/ui/dialog.tsx +107 -0
- package/templates/nextjs/base/src/components/ui/input.tsx +22 -0
- package/templates/nextjs/base/src/components/ui/label.tsx +21 -0
- package/templates/nextjs/base/src/components/ui/radio-group.tsx +38 -0
- package/templates/nextjs/base/src/components/ui/select.tsx +153 -0
- package/templates/nextjs/base/src/components/ui/separator.tsx +26 -0
- package/templates/nextjs/base/src/components/ui/sheet.tsx +125 -0
- package/templates/nextjs/base/src/components/ui/skeleton.tsx +7 -0
- package/templates/nextjs/base/src/components/ui/tabs.tsx +55 -0
- package/templates/nextjs/base/src/components/ui/textarea.tsx +21 -0
- package/templates/nextjs/base/src/components/ui/tooltip.tsx +32 -0
- package/templates/nextjs/base/src/core/hooks/use-cart-page.ts +58 -0
- package/templates/nextjs/base/src/core/hooks/use-home-data.ts +51 -0
- package/templates/nextjs/base/src/core/hooks/use-product-listing.ts +295 -0
- package/templates/nextjs/base/src/core/hooks/use-product-page.ts +278 -0
- package/templates/nextjs/base/src/{hooks → core/hooks}/use-search.ts +1 -1
- package/templates/nextjs/base/src/{lib → core/lib}/brainerce.ts.ejs +1 -1
- package/templates/nextjs/base/src/core/lib/product-options.ts +121 -0
- package/templates/nextjs/base/src/{lib → core/lib}/resolve-currency.ts +1 -1
- package/templates/nextjs/base/src/{lib → core/lib}/safe-redirect.ts +1 -1
- package/templates/nextjs/base/src/{lib → core/lib}/sanitize.ts.ejs +1 -1
- package/templates/nextjs/base/src/{lib → core/lib}/use-currency.ts +1 -1
- package/templates/nextjs/base/src/{providers → core/providers}/store-provider.tsx.ejs +4 -4
- package/templates/nextjs/base/src/{components → ui}/cart/cart-bundle-offer.tsx +22 -16
- package/templates/nextjs/base/src/{components → ui}/cart/cart-item.tsx +8 -14
- package/templates/nextjs/base/src/{components → ui}/cart/cart-nudges.tsx +28 -39
- package/templates/nextjs/base/src/{components → ui}/cart/cart-summary.tsx +7 -5
- package/templates/nextjs/base/src/{components → ui}/cart/cart-upgrade-banner.tsx +13 -28
- package/templates/nextjs/base/src/ui/cart/cart-view.tsx +140 -0
- package/templates/nextjs/base/src/{components → ui}/cart/coupon-input.tsx +14 -25
- package/templates/nextjs/base/src/{components → ui}/cart/free-shipping-bar.tsx +6 -7
- package/templates/nextjs/base/src/{components → ui}/cart/reservation-countdown.tsx +95 -103
- package/templates/nextjs/base/src/ui/home/discount-banner-strip.tsx +20 -0
- package/templates/nextjs/base/src/ui/home/featured-products-section.tsx +24 -0
- package/templates/nextjs/base/src/ui/home/hero-section.tsx +27 -0
- package/templates/nextjs/base/src/ui/home/home-client.tsx +29 -0
- package/templates/nextjs/base/src/{components/content → ui/layout}/announcement-bar.tsx.ejs +116 -125
- package/templates/nextjs/base/src/ui/layout/faq-section.tsx.ejs +90 -0
- package/templates/nextjs/base/src/{components/content → ui/layout}/header-account.tsx +5 -20
- package/templates/nextjs/base/src/ui/layout/language-switcher.tsx.ejs +80 -0
- package/templates/nextjs/base/src/{components/content → ui/layout}/rich-text-block.tsx.ejs +1 -1
- package/templates/nextjs/base/src/{components/content → ui/layout}/site-footer.tsx.ejs +144 -164
- package/templates/nextjs/base/src/{components/content → ui/layout}/site-header.tsx.ejs +152 -182
- package/templates/nextjs/base/src/{components/products → ui/product}/customization-fields.tsx +457 -478
- package/templates/nextjs/base/src/{components/products → ui/product}/discount-badge.tsx +18 -22
- package/templates/nextjs/base/src/{components/products → ui/product}/frequently-bought-together.tsx +21 -33
- package/templates/nextjs/base/src/ui/product/modifier-group-selector.tsx +206 -0
- package/templates/nextjs/base/src/{components/shared → ui/product}/price-display.tsx +5 -4
- package/templates/nextjs/base/src/{components/products → ui/product}/product-card.tsx +238 -271
- package/templates/nextjs/base/src/{app/products/[slug] → ui/product}/product-client-section.tsx +455 -631
- package/templates/nextjs/base/src/{components/products → ui/product}/product-grid.tsx +3 -3
- package/templates/nextjs/base/src/ui/product/product-listing.tsx +446 -0
- package/templates/nextjs/base/src/{components/products → ui/product}/recommendation-section.tsx +102 -107
- package/templates/nextjs/base/src/{components/reviews → ui/product}/review-form.tsx +46 -45
- package/templates/nextjs/base/src/{components/reviews/reviews-section.tsx → ui/product/reviews-section.tsx.ejs} +38 -15
- package/templates/nextjs/base/src/{components/products → ui/product}/stock-badge.tsx +61 -63
- package/templates/nextjs/base/src/{components/products → ui/product}/variant-selector.tsx +3 -3
- package/templates/nextjs/base/src/{components → ui}/shared/cdn-image.tsx +1 -1
- package/templates/nextjs/base/src/{components → ui}/shared/loading-spinner.tsx +2 -2
- package/templates/nextjs/base/tailwind.config.ts +69 -30
- package/templates/nextjs/designs/atelier/app-overlay/layout.tsx.ejs +251 -0
- package/templates/nextjs/designs/atelier/globals.css +396 -0
- package/templates/nextjs/designs/atelier/messages-patch/en.json +99 -0
- package/templates/nextjs/designs/atelier/messages-patch/he.json +99 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-bundle-offer.tsx +110 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-drawer.tsx +163 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-item.tsx +140 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-nudges.tsx +34 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-summary.tsx +107 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-upgrade-banner.tsx +123 -0
- package/templates/nextjs/designs/atelier/ui/cart/cart-view.tsx +147 -0
- package/templates/nextjs/designs/atelier/ui/cart/coupon-input.tsx +142 -0
- package/templates/nextjs/designs/atelier/ui/cart/free-shipping-bar.tsx +77 -0
- package/templates/nextjs/designs/atelier/ui/cart/reservation-countdown.tsx +89 -0
- package/templates/nextjs/designs/atelier/ui/home/benefits-band.tsx +34 -0
- package/templates/nextjs/designs/atelier/ui/home/category-tiles.tsx +148 -0
- package/templates/nextjs/designs/atelier/ui/home/discount-banner-strip.tsx +27 -0
- package/templates/nextjs/designs/atelier/ui/home/editorial-band.tsx +73 -0
- package/templates/nextjs/designs/atelier/ui/home/featured-products-section.tsx +36 -0
- package/templates/nextjs/designs/atelier/ui/home/hero-section.tsx +148 -0
- package/templates/nextjs/designs/atelier/ui/home/home-client.tsx +54 -0
- package/templates/nextjs/designs/atelier/ui/home/newsletter-section.tsx +78 -0
- package/templates/nextjs/designs/atelier/ui/home/testimonials-band.tsx +46 -0
- package/templates/nextjs/designs/atelier/ui/layout/announcement-bar.tsx +118 -0
- package/templates/nextjs/designs/atelier/ui/layout/faq-section.tsx +96 -0
- package/templates/nextjs/designs/atelier/ui/layout/header-account.tsx +36 -0
- package/templates/nextjs/designs/atelier/ui/layout/header-cart.tsx +36 -0
- package/templates/nextjs/designs/atelier/ui/layout/language-switcher.tsx.ejs +137 -0
- package/templates/nextjs/designs/atelier/ui/layout/nav-url.ts +14 -0
- package/templates/nextjs/designs/atelier/ui/layout/rich-text-block.tsx +34 -0
- package/templates/nextjs/designs/atelier/ui/layout/site-footer.tsx.ejs +141 -0
- package/templates/nextjs/designs/atelier/ui/layout/site-header.tsx.ejs +138 -0
- package/templates/nextjs/designs/atelier/ui/product/customization-fields.tsx +466 -0
- package/templates/nextjs/designs/atelier/ui/product/discount-badge.tsx +17 -0
- package/templates/nextjs/designs/atelier/ui/product/frequently-bought-together.tsx +196 -0
- package/templates/nextjs/designs/atelier/ui/product/modifier-group-selector.tsx +193 -0
- package/templates/nextjs/designs/atelier/ui/product/price-display.tsx +69 -0
- package/templates/nextjs/designs/atelier/ui/product/product-card.tsx +260 -0
- package/templates/nextjs/designs/atelier/ui/product/product-client-section.tsx +471 -0
- package/templates/nextjs/designs/atelier/ui/product/product-grid.tsx +47 -0
- package/templates/nextjs/designs/atelier/ui/product/product-listing.tsx +260 -0
- package/templates/nextjs/designs/atelier/ui/product/recommendation-section.tsx +95 -0
- package/templates/nextjs/designs/atelier/ui/product/review-form.tsx +267 -0
- package/templates/nextjs/designs/atelier/ui/product/reviews-section.tsx.ejs +148 -0
- package/templates/nextjs/designs/atelier/ui/product/stock-badge.tsx +66 -0
- package/templates/nextjs/designs/atelier/ui/product/variant-selector.tsx +206 -0
- package/templates/nextjs/designs/atelier/ui/shared/cdn-image.tsx +29 -0
- package/templates/nextjs/designs/atelier/ui/shared/fly-to-cart.ts +86 -0
- package/templates/nextjs/designs/atelier/ui/shared/icons.tsx +269 -0
- package/templates/nextjs/designs/atelier/ui/shared/loading-spinner.tsx +64 -0
- package/templates/nextjs/designs/atelier/ui/shared/reveal.tsx +71 -0
- package/templates/nextjs/designs/atelier/ui/shared/select-menu.tsx +125 -0
- package/templates/nextjs/themes/luxury/globals.css +405 -399
- package/templates/nextjs/themes/minimal/globals.css +36 -30
- package/templates/nextjs/themes/playful/globals.css +406 -400
- package/templates/nextjs/ui-canvas/cart/cart-bundle-offer.tsx +89 -0
- package/templates/nextjs/ui-canvas/cart/cart-item.tsx +123 -0
- package/templates/nextjs/ui-canvas/cart/cart-nudges.tsx +27 -0
- package/templates/nextjs/ui-canvas/cart/cart-summary.tsx +99 -0
- package/templates/nextjs/ui-canvas/cart/cart-upgrade-banner.tsx +105 -0
- package/templates/nextjs/ui-canvas/cart/cart-view.tsx +106 -0
- package/templates/nextjs/ui-canvas/cart/coupon-input.tsx +119 -0
- package/templates/nextjs/ui-canvas/cart/free-shipping-bar.tsx +54 -0
- package/templates/nextjs/ui-canvas/cart/reservation-countdown.tsx +81 -0
- package/templates/nextjs/ui-canvas/home/discount-banner-strip.tsx +19 -0
- package/templates/nextjs/ui-canvas/home/featured-products-section.tsx +23 -0
- package/templates/nextjs/ui-canvas/home/hero-section.tsx +21 -0
- package/templates/nextjs/ui-canvas/home/home-client.tsx +26 -0
- package/templates/nextjs/ui-canvas/layout/announcement-bar.tsx.ejs +101 -0
- package/templates/nextjs/ui-canvas/layout/faq-section.tsx.ejs +71 -0
- package/templates/nextjs/ui-canvas/layout/header-account.tsx +31 -0
- package/templates/nextjs/{base/src/components → ui-canvas}/layout/language-switcher.tsx.ejs +76 -70
- package/templates/nextjs/ui-canvas/layout/rich-text-block.tsx.ejs +36 -0
- package/templates/nextjs/ui-canvas/layout/site-footer.tsx.ejs +82 -0
- package/templates/nextjs/ui-canvas/layout/site-header.tsx.ejs +119 -0
- package/templates/nextjs/ui-canvas/product/customization-fields.tsx +445 -0
- package/templates/nextjs/ui-canvas/product/discount-badge.tsx +19 -0
- package/templates/nextjs/ui-canvas/product/frequently-bought-together.tsx +168 -0
- package/templates/nextjs/ui-canvas/product/modifier-group-selector.tsx +165 -0
- package/templates/nextjs/ui-canvas/product/price-display.tsx +52 -0
- package/templates/nextjs/ui-canvas/product/product-card.tsx +197 -0
- package/templates/nextjs/ui-canvas/product/product-client-section.tsx +352 -0
- package/templates/nextjs/ui-canvas/product/product-grid.tsx +27 -0
- package/templates/nextjs/ui-canvas/product/product-listing.tsx +224 -0
- package/templates/nextjs/ui-canvas/product/recommendation-section.tsx +99 -0
- package/templates/nextjs/ui-canvas/product/review-form.tsx +266 -0
- package/templates/nextjs/ui-canvas/product/reviews-section.tsx.ejs +96 -0
- package/templates/nextjs/ui-canvas/product/stock-badge.tsx +45 -0
- package/templates/nextjs/ui-canvas/product/variant-selector.tsx +212 -0
- package/templates/nextjs/ui-canvas/shared/cdn-image.tsx +31 -0
- package/templates/nextjs/ui-canvas/shared/loading-spinner.tsx +27 -0
- package/templates/nextjs/base/src/app/home-client.tsx +0 -98
- package/templates/nextjs/base/src/components/content/faq-section.tsx.ejs +0 -103
- package/templates/nextjs/base/src/components/products/modifier-group-selector.tsx +0 -238
- /package/templates/nextjs/base/src/{lib → core/lib}/auth.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/csrf.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/image-hosts.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/navigation.tsx.ejs +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/nonce.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/sanitize-html.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/seo.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/store-info.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/translations.ts.ejs +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/utils.ts +0 -0
- /package/templates/nextjs/base/src/{lib → core/lib}/validation.ts +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Star } from 'lucide-react';
|
|
5
|
+
import { getClient } from '@/core/lib/brainerce';
|
|
6
|
+
import { checkAuthStatus } from '@/core/lib/auth';
|
|
7
|
+
import { Link } from '@/core/lib/navigation';
|
|
8
|
+
import { useTranslations } from '@/core/lib/translations';
|
|
9
|
+
import { Button } from '@/components/ui/button';
|
|
10
|
+
import { Label } from '@/components/ui/label';
|
|
11
|
+
import { Textarea } from '@/components/ui/textarea';
|
|
6
12
|
import type { MyProductReview, ProductReview } from 'brainerce';
|
|
7
13
|
|
|
8
14
|
interface ReviewFormProps {
|
|
@@ -26,6 +32,7 @@ type Stage =
|
|
|
26
32
|
*/
|
|
27
33
|
export function ReviewForm({ productId }: ReviewFormProps) {
|
|
28
34
|
const [stage, setStage] = useState<Stage>({ kind: 'loading' });
|
|
35
|
+
const t = useTranslations('reviews');
|
|
29
36
|
|
|
30
37
|
useEffect(() => {
|
|
31
38
|
let cancelled = false;
|
|
@@ -59,17 +66,17 @@ export function ReviewForm({ productId }: ReviewFormProps) {
|
|
|
59
66
|
}, [productId]);
|
|
60
67
|
|
|
61
68
|
if (stage.kind === 'loading') {
|
|
62
|
-
return <div className="text-muted-foreground text-sm">
|
|
69
|
+
return <div className="text-muted-foreground text-sm">{t('loading')}</div>;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
if (stage.kind === 'signed_out') {
|
|
66
73
|
return (
|
|
67
74
|
<div className="rounded-md border p-4">
|
|
68
75
|
<p className="text-sm">
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
</
|
|
72
|
-
|
|
76
|
+
<Link href="/account/login" className="font-medium underline">
|
|
77
|
+
{t('signIn')}
|
|
78
|
+
</Link>{' '}
|
|
79
|
+
{t('signInSuffix')}
|
|
73
80
|
</p>
|
|
74
81
|
</div>
|
|
75
82
|
);
|
|
@@ -93,16 +100,17 @@ export function ReviewForm({ productId }: ReviewFormProps) {
|
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
function NotEligibleMessage({ reason }: { reason: MyProductReview['reason'] }) {
|
|
103
|
+
const t = useTranslations('reviews');
|
|
96
104
|
let message: string;
|
|
97
105
|
switch (reason) {
|
|
98
106
|
case 'no_eligible_order':
|
|
99
|
-
message = '
|
|
107
|
+
message = t('onlyPurchasers');
|
|
100
108
|
break;
|
|
101
109
|
case 'reviews_disabled':
|
|
102
|
-
message = '
|
|
110
|
+
message = t('reviewsDisabled');
|
|
103
111
|
break;
|
|
104
112
|
default:
|
|
105
|
-
message = '
|
|
113
|
+
message = t('cannotReview');
|
|
106
114
|
}
|
|
107
115
|
return (
|
|
108
116
|
<div className="bg-muted/30 rounded-md border p-4">
|
|
@@ -125,10 +133,11 @@ function EditReviewBlock({
|
|
|
125
133
|
onDeleted: () => void;
|
|
126
134
|
}) {
|
|
127
135
|
const [deleting, setDeleting] = useState(false);
|
|
136
|
+
const t = useTranslations('reviews');
|
|
128
137
|
const [deleteError, setDeleteError] = useState<string | null>(null);
|
|
129
138
|
|
|
130
139
|
async function handleDelete() {
|
|
131
|
-
if (!window.confirm('
|
|
140
|
+
if (!window.confirm(t('confirmDelete'))) return;
|
|
132
141
|
setDeleting(true);
|
|
133
142
|
setDeleteError(null);
|
|
134
143
|
try {
|
|
@@ -136,7 +145,7 @@ function EditReviewBlock({
|
|
|
136
145
|
onDeleted();
|
|
137
146
|
window.location.reload();
|
|
138
147
|
} catch {
|
|
139
|
-
setDeleteError('
|
|
148
|
+
setDeleteError(t('deleteFailed'));
|
|
140
149
|
} finally {
|
|
141
150
|
setDeleting(false);
|
|
142
151
|
}
|
|
@@ -151,14 +160,14 @@ function EditReviewBlock({
|
|
|
151
160
|
initialBody={initial.body ?? ''}
|
|
152
161
|
/>
|
|
153
162
|
<div className="flex items-center justify-between rounded-md border border-red-100 bg-red-50/50 p-3">
|
|
154
|
-
<p className="text-xs text-red-700">
|
|
163
|
+
<p className="text-xs text-red-700">{t('startOver')}</p>
|
|
155
164
|
<button
|
|
156
165
|
type="button"
|
|
157
166
|
onClick={handleDelete}
|
|
158
167
|
disabled={deleting}
|
|
159
168
|
className="text-xs font-medium text-red-700 underline disabled:opacity-50"
|
|
160
169
|
>
|
|
161
|
-
{deleting ? '
|
|
170
|
+
{deleting ? t('deleting') : t('deleteReview')}
|
|
162
171
|
</button>
|
|
163
172
|
</div>
|
|
164
173
|
{deleteError && (
|
|
@@ -187,6 +196,7 @@ function ReviewEditor({
|
|
|
187
196
|
initialBody: string;
|
|
188
197
|
}) {
|
|
189
198
|
const [rating, setRating] = useState(initialRating);
|
|
199
|
+
const t = useTranslations('reviews');
|
|
190
200
|
const [body, setBody] = useState(initialBody);
|
|
191
201
|
const [submitting, setSubmitting] = useState(false);
|
|
192
202
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -209,17 +219,13 @@ function ReviewEditor({
|
|
|
209
219
|
} catch (err) {
|
|
210
220
|
const status = (err as { status?: number })?.status;
|
|
211
221
|
if (status === 409) {
|
|
212
|
-
setError(
|
|
222
|
+
setError(t('alreadySubmitted'));
|
|
213
223
|
} else if (status === 403) {
|
|
214
|
-
setError('
|
|
224
|
+
setError(t('onlyPurchasers'));
|
|
215
225
|
} else if (status === 429) {
|
|
216
|
-
setError('
|
|
226
|
+
setError(t('tooMany'));
|
|
217
227
|
} else {
|
|
218
|
-
setError(
|
|
219
|
-
mode === 'edit'
|
|
220
|
-
? 'Could not update your review. Please try again.'
|
|
221
|
-
: 'Could not submit your review. Please try again.'
|
|
222
|
-
);
|
|
228
|
+
setError(mode === 'edit' ? t('updateFailed') : t('submitFailed'));
|
|
223
229
|
}
|
|
224
230
|
} finally {
|
|
225
231
|
setSubmitting(false);
|
|
@@ -229,20 +235,18 @@ function ReviewEditor({
|
|
|
229
235
|
if (success) {
|
|
230
236
|
return (
|
|
231
237
|
<p className="rounded-md border border-emerald-200 bg-emerald-50 p-3 text-sm text-emerald-700">
|
|
232
|
-
{mode === 'edit'
|
|
233
|
-
? 'Thanks! Your review has been updated.'
|
|
234
|
-
: 'Thanks! Your review has been submitted.'}
|
|
238
|
+
{mode === 'edit' ? t('thanksUpdated') : t('thanksSubmitted')}
|
|
235
239
|
</p>
|
|
236
240
|
);
|
|
237
241
|
}
|
|
238
242
|
|
|
239
243
|
return (
|
|
240
244
|
<form onSubmit={handleSubmit} className="space-y-3 rounded-md border p-4">
|
|
241
|
-
<h3 className="font-medium">{mode === 'edit' ? '
|
|
245
|
+
<h3 className="font-medium">{mode === 'edit' ? t('editYourReview') : t('writeReview')}</h3>
|
|
242
246
|
|
|
243
247
|
<fieldset>
|
|
244
|
-
<legend className="mb-1 text-sm">
|
|
245
|
-
<div className="inline-flex gap-1" role="radiogroup" aria-label=
|
|
248
|
+
<legend className="mb-1 text-sm">{t('yourRating')}</legend>
|
|
249
|
+
<div className="inline-flex gap-1" role="radiogroup" aria-label={t('starRating')}>
|
|
246
250
|
{[1, 2, 3, 4, 5].map((n) => (
|
|
247
251
|
<button
|
|
248
252
|
key={n}
|
|
@@ -250,24 +254,25 @@ function ReviewEditor({
|
|
|
250
254
|
role="radio"
|
|
251
255
|
aria-checked={rating === n}
|
|
252
256
|
onClick={() => setRating(n)}
|
|
253
|
-
className={
|
|
257
|
+
className={n <= rating ? 'text-yellow-500' : 'text-gray-300'}
|
|
254
258
|
>
|
|
255
|
-
|
|
259
|
+
<Star className="h-6 w-6 fill-current" aria-hidden="true" />
|
|
256
260
|
</button>
|
|
257
261
|
))}
|
|
258
262
|
</div>
|
|
259
263
|
</fieldset>
|
|
260
264
|
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
<
|
|
265
|
+
<Label className="block text-sm font-normal">
|
|
266
|
+
{t('yourReview')}{' '}
|
|
267
|
+
<span className="text-muted-foreground text-xs">({t('optionalField')})</span>
|
|
268
|
+
<Textarea
|
|
264
269
|
value={body}
|
|
265
270
|
onChange={(event) => setBody(event.target.value)}
|
|
266
271
|
maxLength={5000}
|
|
267
272
|
rows={4}
|
|
268
|
-
className="mt-1
|
|
273
|
+
className="mt-1 rounded"
|
|
269
274
|
/>
|
|
270
|
-
</
|
|
275
|
+
</Label>
|
|
271
276
|
|
|
272
277
|
{error && (
|
|
273
278
|
<p role="alert" className="text-sm text-red-700">
|
|
@@ -275,19 +280,15 @@ function ReviewEditor({
|
|
|
275
280
|
</p>
|
|
276
281
|
)}
|
|
277
282
|
|
|
278
|
-
<
|
|
279
|
-
type="submit"
|
|
280
|
-
disabled={submitting}
|
|
281
|
-
className="inline-flex items-center rounded bg-black px-4 py-2 text-sm text-white disabled:opacity-50"
|
|
282
|
-
>
|
|
283
|
+
<Button type="submit" disabled={submitting}>
|
|
283
284
|
{submitting
|
|
284
285
|
? mode === 'edit'
|
|
285
|
-
? '
|
|
286
|
-
: '
|
|
286
|
+
? t('saving')
|
|
287
|
+
: t('submittingBtn')
|
|
287
288
|
: mode === 'edit'
|
|
288
|
-
? '
|
|
289
|
-
: '
|
|
290
|
-
</
|
|
289
|
+
? t('saveChanges')
|
|
290
|
+
: t('submitReview')}
|
|
291
|
+
</Button>
|
|
291
292
|
</form>
|
|
292
293
|
);
|
|
293
294
|
}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
import { Star } from 'lucide-react';
|
|
1
2
|
import type { ProductReview } from 'brainerce';
|
|
2
|
-
import { getServerClient } from '@/lib/brainerce';
|
|
3
|
+
import { getServerClient } from '@/core/lib/brainerce';
|
|
4
|
+
import { Badge } from '@/components/ui/badge';
|
|
5
|
+
<% if (i18nEnabled) { %>import { getMessages, defaultLocale } from '@/i18n';<% } else { %>import { defaultLocale, messages } from '@/i18n';<% } %>
|
|
3
6
|
import { ReviewForm } from './review-form';
|
|
4
7
|
|
|
8
|
+
// Server component — it renders before any client i18n context exists, so the
|
|
9
|
+
// wrapper strings (title / empty state / verified badge) are read straight
|
|
10
|
+
// from the `reviews` namespace in messages/, keyed by the store locale.
|
|
11
|
+
type ReviewStrings = Record<string, string>;
|
|
12
|
+
|
|
13
|
+
<% if (i18nEnabled) { %>async function getReviewStrings(locale: string): Promise<ReviewStrings> {
|
|
14
|
+
return ((await getMessages(locale)).reviews ?? {}) as ReviewStrings;
|
|
15
|
+
}<% } else { %>async function getReviewStrings(_locale: string): Promise<ReviewStrings> {
|
|
16
|
+
return messages.reviews as ReviewStrings;
|
|
17
|
+
}<% } %>
|
|
18
|
+
|
|
5
19
|
interface ReviewsSectionProps {
|
|
6
20
|
productId: string;
|
|
7
21
|
initialReviews?: ProductReview[];
|
|
22
|
+
locale?: string;
|
|
8
23
|
/** Where to send users back to after submit (defaults to the current product URL). */
|
|
9
24
|
returnUrl?: string;
|
|
10
25
|
}
|
|
@@ -16,7 +31,12 @@ interface ReviewsSectionProps {
|
|
|
16
31
|
* the initial HTML payload (good for SEO; JSON-LD on the same page already
|
|
17
32
|
* carries `aggregateRating` when reviewCount > 0).
|
|
18
33
|
*/
|
|
19
|
-
export async function ReviewsSection({
|
|
34
|
+
export async function ReviewsSection({
|
|
35
|
+
productId,
|
|
36
|
+
initialReviews,
|
|
37
|
+
locale = defaultLocale,
|
|
38
|
+
}: ReviewsSectionProps) {
|
|
39
|
+
const t = await getReviewStrings(locale);
|
|
20
40
|
let reviews: ProductReview[] = initialReviews ?? [];
|
|
21
41
|
|
|
22
42
|
if (!initialReviews) {
|
|
@@ -24,7 +44,7 @@ export async function ReviewsSection({ productId, initialReviews }: ReviewsSecti
|
|
|
24
44
|
const result = await getServerClient().listProductReviews(productId, { page: 1, limit: 20 });
|
|
25
45
|
reviews = result.data;
|
|
26
46
|
} catch {
|
|
27
|
-
//
|
|
47
|
+
// Review listing disabled at store level or network error — render the form anyway.
|
|
28
48
|
reviews = [];
|
|
29
49
|
}
|
|
30
50
|
}
|
|
@@ -32,17 +52,15 @@ export async function ReviewsSection({ productId, initialReviews }: ReviewsSecti
|
|
|
32
52
|
return (
|
|
33
53
|
<section className="mt-8" aria-labelledby="reviews-heading">
|
|
34
54
|
<h2 id="reviews-heading" className="mb-4 text-xl font-semibold">
|
|
35
|
-
|
|
55
|
+
{t.title}
|
|
36
56
|
</h2>
|
|
37
57
|
|
|
38
58
|
{reviews.length === 0 ? (
|
|
39
|
-
<p className="text-muted-foreground mb-6 text-sm">
|
|
40
|
-
No reviews yet — be the first to share your experience.
|
|
41
|
-
</p>
|
|
59
|
+
<p className="text-muted-foreground mb-6 text-sm">{t.noReviews}</p>
|
|
42
60
|
) : (
|
|
43
61
|
<ul className="mb-6 space-y-4">
|
|
44
62
|
{reviews.map((review) => (
|
|
45
|
-
<ReviewCard key={review.id} review={review} />
|
|
63
|
+
<ReviewCard key={review.id} review={review} verifiedLabel={t.verifiedPurchase} />
|
|
46
64
|
))}
|
|
47
65
|
</ul>
|
|
48
66
|
)}
|
|
@@ -52,16 +70,19 @@ export async function ReviewsSection({ productId, initialReviews }: ReviewsSecti
|
|
|
52
70
|
);
|
|
53
71
|
}
|
|
54
72
|
|
|
55
|
-
function ReviewCard({ review }: { review: ProductReview }) {
|
|
73
|
+
function ReviewCard({ review, verifiedLabel }: { review: ProductReview; verifiedLabel: string }) {
|
|
56
74
|
return (
|
|
57
75
|
<li className="rounded-md border p-4">
|
|
58
76
|
<header className="flex flex-wrap items-center gap-2">
|
|
59
77
|
<Stars rating={review.rating} />
|
|
60
78
|
<span className="text-sm font-medium">{review.authorName}</span>
|
|
61
79
|
{review.verifiedPurchase && (
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
80
|
+
<Badge
|
|
81
|
+
variant="outline"
|
|
82
|
+
className="rounded border-transparent bg-emerald-50 px-2 py-0.5 font-normal text-emerald-700"
|
|
83
|
+
>
|
|
84
|
+
{verifiedLabel}
|
|
85
|
+
</Badge>
|
|
65
86
|
)}
|
|
66
87
|
<time className="text-muted-foreground ms-auto text-xs">
|
|
67
88
|
{new Date(review.createdAt).toLocaleDateString()}
|
|
@@ -76,9 +97,11 @@ function Stars({ rating }: { rating: number }) {
|
|
|
76
97
|
return (
|
|
77
98
|
<span aria-label={`${rating} of 5 stars`} className="inline-flex">
|
|
78
99
|
{[1, 2, 3, 4, 5].map((n) => (
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
<Star
|
|
101
|
+
key={n}
|
|
102
|
+
className={`h-4 w-4 fill-current ${n <= rating ? 'text-yellow-500' : 'text-gray-300'}`}
|
|
103
|
+
aria-hidden="true"
|
|
104
|
+
/>
|
|
82
105
|
))}
|
|
83
106
|
</span>
|
|
84
107
|
);
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import type { InventoryInfo } from 'brainerce';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (trackingMode === '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return 'bg-green-100 text-green-800';
|
|
63
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { InventoryInfo } from 'brainerce';
|
|
4
|
+
import { Badge } from '@/components/ui/badge';
|
|
5
|
+
import { cn } from '@/core/lib/utils';
|
|
6
|
+
import { useTranslations } from '@/core/lib/translations';
|
|
7
|
+
|
|
8
|
+
interface StockBadgeProps {
|
|
9
|
+
inventory: InventoryInfo | null | undefined;
|
|
10
|
+
lowStockThreshold?: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function StockBadge({ inventory, lowStockThreshold = 5, className }: StockBadgeProps) {
|
|
15
|
+
const t = useTranslations('productDetail');
|
|
16
|
+
const label = getStockLabel(inventory, lowStockThreshold, t);
|
|
17
|
+
const color = getStockColor(inventory, lowStockThreshold);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Badge
|
|
21
|
+
variant="outline"
|
|
22
|
+
className={cn('border-transparent px-2 py-0.5 font-medium', color, className)}
|
|
23
|
+
>
|
|
24
|
+
{label}
|
|
25
|
+
</Badge>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function getStockLabel(
|
|
30
|
+
inventory: InventoryInfo | null | undefined,
|
|
31
|
+
lowStockThreshold: number,
|
|
32
|
+
t: (key: string) => string
|
|
33
|
+
): string {
|
|
34
|
+
if (!inventory) return t('outOfStock');
|
|
35
|
+
|
|
36
|
+
const { trackingMode, inStock, available } = inventory;
|
|
37
|
+
|
|
38
|
+
if (trackingMode === 'DISABLED') return t('unavailable');
|
|
39
|
+
if (!inStock) return t('outOfStock');
|
|
40
|
+
if (trackingMode === 'UNLIMITED') return t('inStock');
|
|
41
|
+
|
|
42
|
+
// TRACKED — show actual quantity
|
|
43
|
+
if (available <= lowStockThreshold) {
|
|
44
|
+
return t('onlyLeft').replace('{available}', String(available));
|
|
45
|
+
}
|
|
46
|
+
return t('availableInStock').replace('{available}', String(available));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getStockColor(
|
|
50
|
+
inventory: InventoryInfo | null | undefined,
|
|
51
|
+
lowStockThreshold: number
|
|
52
|
+
): string {
|
|
53
|
+
if (!inventory) return 'bg-red-100 text-red-800';
|
|
54
|
+
|
|
55
|
+
const { trackingMode, inStock, available } = inventory;
|
|
56
|
+
|
|
57
|
+
if (trackingMode === 'DISABLED' || !inStock) return 'bg-red-100 text-red-800';
|
|
58
|
+
if (trackingMode === 'TRACKED' && available <= lowStockThreshold)
|
|
59
|
+
return 'bg-yellow-100 text-yellow-800';
|
|
60
|
+
return 'bg-green-100 text-green-800';
|
|
61
|
+
}
|
|
@@ -4,9 +4,9 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import type { Product, ProductVariant } from 'brainerce';
|
|
5
5
|
import { getVariantOptions, getProductSwatches, formatPrice } from 'brainerce';
|
|
6
6
|
import type { InventoryInfo } from 'brainerce';
|
|
7
|
-
import { useCurrency } from '@/lib/use-currency';
|
|
8
|
-
import { useTranslations } from '@/lib/translations';
|
|
9
|
-
import { cn } from '@/lib/utils';
|
|
7
|
+
import { useCurrency } from '@/core/lib/use-currency';
|
|
8
|
+
import { useTranslations } from '@/core/lib/translations';
|
|
9
|
+
import { cn } from '@/core/lib/utils';
|
|
10
10
|
|
|
11
11
|
interface VariantSelectorProps {
|
|
12
12
|
product: Product;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useTranslations } from '@/lib/translations';
|
|
4
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import { useTranslations } from '@/core/lib/translations';
|
|
4
|
+
import { cn } from '@/core/lib/utils';
|
|
5
5
|
|
|
6
6
|
interface LoadingSpinnerProps {
|
|
7
7
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -1,30 +1,69 @@
|
|
|
1
|
-
import type { Config } from 'tailwindcss';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'
|
|
12
|
-
|
|
13
|
-
foreground: 'hsl(var(--foreground))',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import type { Config } from 'tailwindcss';
|
|
2
|
+
import tailwindcssAnimate from 'tailwindcss-animate';
|
|
3
|
+
|
|
4
|
+
const config: Config = {
|
|
5
|
+
darkMode: ['class'],
|
|
6
|
+
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
colors: {
|
|
10
|
+
primary: 'hsl(var(--primary))',
|
|
11
|
+
'primary-foreground': 'hsl(var(--primary-foreground))',
|
|
12
|
+
secondary: 'hsl(var(--secondary))',
|
|
13
|
+
'secondary-foreground': 'hsl(var(--secondary-foreground))',
|
|
14
|
+
background: 'hsl(var(--background))',
|
|
15
|
+
foreground: 'hsl(var(--foreground))',
|
|
16
|
+
muted: 'hsl(var(--muted))',
|
|
17
|
+
'muted-foreground': 'hsl(var(--muted-foreground))',
|
|
18
|
+
border: 'hsl(var(--border))',
|
|
19
|
+
input: 'hsl(var(--input))',
|
|
20
|
+
ring: 'hsl(var(--ring))',
|
|
21
|
+
destructive: 'hsl(var(--destructive))',
|
|
22
|
+
'destructive-foreground': 'hsl(var(--destructive-foreground))',
|
|
23
|
+
accent: 'hsl(var(--accent))',
|
|
24
|
+
'accent-foreground': 'hsl(var(--accent-foreground))',
|
|
25
|
+
card: 'hsl(var(--card))',
|
|
26
|
+
'card-foreground': 'hsl(var(--card-foreground))',
|
|
27
|
+
popover: 'hsl(var(--popover))',
|
|
28
|
+
'popover-foreground': 'hsl(var(--popover-foreground))',
|
|
29
|
+
// Extended tokens used by design packs (defined in their globals.css).
|
|
30
|
+
// Harmless when a design doesn't set the CSS variables — the classes
|
|
31
|
+
// simply aren't used by the base ui.
|
|
32
|
+
surface: 'hsl(var(--surface))',
|
|
33
|
+
plinth: 'hsl(var(--plinth))',
|
|
34
|
+
},
|
|
35
|
+
fontFamily: {
|
|
36
|
+
// Design packs set --font-sans / --font-serif via next/font variables
|
|
37
|
+
// in app/layout.tsx; the fallbacks keep font-sans/font-serif usable
|
|
38
|
+
// even when a layout doesn't define them.
|
|
39
|
+
sans: ['var(--font-sans)', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
|
40
|
+
serif: ['var(--font-serif)', 'ui-serif', 'Georgia', 'serif'],
|
|
41
|
+
},
|
|
42
|
+
borderRadius: {
|
|
43
|
+
// shadcn/ui convention: every radius derives from the --radius token,
|
|
44
|
+
// so `rounded`, `rounded-md`, `rounded-lg` all follow the theme.
|
|
45
|
+
DEFAULT: 'var(--radius)',
|
|
46
|
+
lg: 'var(--radius)',
|
|
47
|
+
md: 'calc(var(--radius) - 2px)',
|
|
48
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
49
|
+
},
|
|
50
|
+
keyframes: {
|
|
51
|
+
'accordion-down': {
|
|
52
|
+
from: { height: '0' },
|
|
53
|
+
to: { height: 'var(--radix-accordion-content-height)' },
|
|
54
|
+
},
|
|
55
|
+
'accordion-up': {
|
|
56
|
+
from: { height: 'var(--radix-accordion-content-height)' },
|
|
57
|
+
to: { height: '0' },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
animation: {
|
|
61
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
62
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
plugins: [tailwindcssAnimate],
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export default config;
|