diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-21 11:08:50 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-21 11:08:50 +0700 |
| commit | ec69b6f0131939ebfbff1d5082b1229f7b58799b (patch) | |
| tree | f84e549bd157bb94079d2af4d2e3ad31ada34d7b /src/pages | |
| parent | 56ed5980588447c6ba05529e91d6f82820f1b764 (diff) | |
<iman> add try catch
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/shop/checkout/[status].jsx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/pages/shop/checkout/[status].jsx b/src/pages/shop/checkout/[status].jsx index 2c3bebcf..3e390e8d 100644 --- a/src/pages/shop/checkout/[status].jsx +++ b/src/pages/shop/checkout/[status].jsx @@ -1,22 +1,22 @@ -import BasicLayout from '@/core/components/layouts/BasicLayout' -import IsAuth from '@/lib/auth/components/IsAuth' -import FinishCheckoutComponent from '@/lib/checkout/components/FinishCheckout' -import { useRouter } from 'next/router' -import axios from 'axios' -import Seo from '@/core/components/Seo' +import BasicLayout from '@/core/components/layouts/BasicLayout'; +import IsAuth from '@/lib/auth/components/IsAuth'; +import FinishCheckoutComponent from '@/lib/checkout/components/FinishCheckout'; +import { useRouter } from 'next/router'; +import axios from 'axios'; +import Seo from '@/core/components/Seo'; export async function getServerSideProps(context) { - const { order_id } = context.query - await axios.post( - `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/finish-checkout?orderName=${order_id}`, - {}, - { headers: context.req.headers } - ) - return { props: {} } + const { order_id } = context.query; + // await axios.post( + // `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/finish-checkout?orderName=${order_id}`, + // {}, + // { headers: context.req.headers } + // ) + return { props: {} }; } export default function Finish() { - const router = useRouter() + const router = useRouter(); return ( <> @@ -28,5 +28,5 @@ export default function Finish() { </BasicLayout> </IsAuth> </> - ) + ); } |
