refactor time slots
This commit is contained in:
@@ -31,8 +31,11 @@ const env = () =>
|
||||
.min(1),
|
||||
})
|
||||
.parse({
|
||||
medusaBackendPublicUrl: process.env.MEDUSA_BACKEND_PUBLIC_URL!,
|
||||
siteUrl: process.env.NEXT_PUBLIC_SITE_URL!,
|
||||
// Use for local testing
|
||||
medusaBackendPublicUrl: 'http://webhook.site:3000',
|
||||
siteUrl: 'http://webhook.site:3000',
|
||||
// medusaBackendPublicUrl: process.env.MEDUSA_BACKEND_PUBLIC_URL!,
|
||||
// siteUrl: process.env.NEXT_PUBLIC_SITE_URL!,
|
||||
});
|
||||
|
||||
export async function handleAddToCart({
|
||||
@@ -42,6 +45,10 @@ export async function handleAddToCart({
|
||||
selectedVariant: Pick<StoreProductVariant, 'id'>;
|
||||
countryCode: string;
|
||||
}) {
|
||||
try {
|
||||
} catch (e) {
|
||||
console.error('medusa card error: ', e);
|
||||
}
|
||||
const { account } = await loadCurrentUserAccount();
|
||||
if (!account) {
|
||||
throw new Error('Account not found');
|
||||
|
||||
Reference in New Issue
Block a user