clean up unused code and create login callback api endpoints

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-22 15:09:35 +07:00
parent 93f46a3f90
commit 8333eb36fc
26 changed files with 100 additions and 426 deletions

View File

@@ -1,20 +1,17 @@
import { CheckCircleIcon, TruckIcon, ArrowLeftIcon } from '@heroicons/react/24/outline';
import Image from 'next/image';
import { ArrowLeftIcon, CheckCircleIcon, TruckIcon } from '@heroicons/react/24/outline';
import { Button } from 'components/button';
import OrderSummary from 'components/orders/order-summary';
import OrderSummaryMobile from 'components/orders/order-summary-mobile';
import Price from 'components/price';
import Badge from 'components/ui/badge';
import { Card } from 'components/ui/card';
import Heading from 'components/ui/heading';
import Label from 'components/ui/label';
import Text from 'components/ui/text';
import { getCustomerOrder } from 'lib/shopify';
import { Fulfillment, Order } from 'lib/shopify/types';
import Text from 'components/ui/text';
import Price from 'components/price';
import Badge from 'components/ui/badge';
import Image from 'next/image';
import Link from 'next/link';
import OrderSummaryMobile from 'components/account/orders/order-summary-mobile';
import { Suspense } from 'react';
import OrderSummary from 'components/account/orders/order-summary';
export const runtime = 'edge';
function toPrintDate(date: string) {
return new Date(date).toLocaleDateString('en-US', {
@@ -242,9 +239,7 @@ export default async function OrderPage({ params }: { params: { id: string } })
return (
<>
<Suspense>
<OrderSummaryMobile order={order} />
</Suspense>
<OrderSummaryMobile order={order} />
<div className="mx-auto max-w-6xl p-6">
<div className="mb-6 flex justify-between">
<div className="flex items-start gap-2">

View File

@@ -1,16 +1,14 @@
import Image from 'next/image';
import Link from 'next/link';
import { getCustomerOrders } from 'lib/shopify';
import Text from 'components/ui/text';
import Price from 'components/price';
import Divider from 'components/divider';
import { Button } from 'components/button';
import Heading from 'components/ui/heading';
import Label from 'components/ui/label';
import Divider from 'components/divider';
import Price from 'components/price';
import Badge from 'components/ui/badge';
import { Card } from 'components/ui/card';
export const runtime = 'edge';
import Heading from 'components/ui/heading';
import Label from 'components/ui/label';
import Text from 'components/ui/text';
import { getCustomerOrders } from 'lib/shopify';
import Image from 'next/image';
import Link from 'next/link';
export default async function AccountPage() {
const orders = await getCustomerOrders();