diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-03-01 09:18:52 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-03-01 09:18:52 +0000 |
| commit | a7abbf4ddc70068620e9f44b74dc162ce2e16ee2 (patch) | |
| tree | 74f66253717515d364ce74bd8275015c1f829cbc /src/pages/shop/checkout/finish.js | |
| parent | 90e1edab9b6a8ccc09a49fed3addbec2cbc4e4c3 (diff) | |
| parent | a1b9b647a6c4bda1f5db63879639d44543f9557e (diff) | |
Merged in refactor (pull request #1)
Refactor
Diffstat (limited to 'src/pages/shop/checkout/finish.js')
| -rw-r--r-- | src/pages/shop/checkout/finish.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/pages/shop/checkout/finish.js b/src/pages/shop/checkout/finish.js deleted file mode 100644 index df284f8a..00000000 --- a/src/pages/shop/checkout/finish.js +++ /dev/null @@ -1,47 +0,0 @@ -import WithAuth from "@/components/auth/WithAuth"; -import Link from "@/components/elements/Link"; -import AppBar from "@/components/layouts/AppBar"; -import Header from "@/components/layouts/Header"; -import Layout from "@/components/layouts/Layout"; -import apiOdoo from "@/core/utils/apiOdoo"; -import { useAuth } from "@/core/utils/auth"; -import { EnvelopeIcon } from "@heroicons/react/24/outline"; -import { useRouter } from "next/router"; -import { useEffect, useState } from "react"; - -export default function FinishCheckout() { - const router = useRouter(); - const { id } = router.query; - const [ auth ] = useAuth(); - const [ transaction, setTransactions ] = useState(null); - - useEffect(() => { - const loadTransaction = async () => { - if (auth && id) { - const dataTransaction = await apiOdoo('GET', `/api/v1/partner/${auth.partner_id}/sale_order/${id}`); - setTransactions(dataTransaction); - } - }; - loadTransaction(); - }); - - return ( - <WithAuth> - <Layout> - <AppBar title="Pembelian Berhasil" /> - - <div className="m-4 rounded-xl bg-yellow_r-4 text-center border border-yellow_r-7"> - <div className="px-4 py-6 text-yellow_r-12"> - <p className="h2 mb-2">Terima Kasih atas Pembelian Anda</p> - <p className="text-yellow_r-11 mb-4 leading-6">Rincian belanja sudah kami kirimkan ke email anda. Mohon dicek kembali. jika tidak menerima email, anda dapat menghubungi kami disini.</p> - <p className="mb-2 font-medium">{ transaction?.name }</p> - <p className="text-caption-2 text-yellow_r-11">No. Transaksi</p> - </div> - <Link href={transaction?.id ? `/my/transaction/${transaction.id}` : '/'} className="bg-yellow_r-6 text-yellow_r-12 rounded-b-xl py-4 block"> - Lihat detail pembelian Anda disini - </Link> - </div> - </Layout> - </WithAuth> - ); -}
\ No newline at end of file |
