From 6d787688e430591aa5fc0a5cbe542e9fb792fb9c Mon Sep 17 00:00:00 2001 From: Anang20 Date: Mon, 14 Nov 2022 10:47:32 +0700 Subject: [PATCH] fix: add condition payment method --- components/Transaction/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/Transaction/index.js b/components/Transaction/index.js index c33e562..f2fdb79 100644 --- a/components/Transaction/index.js +++ b/components/Transaction/index.js @@ -1,6 +1,5 @@ import React, {useEffect, useRef, useState} from 'react'; -import {Badge, Divider, Tag} from "antd"; -import Image from "next/image"; +import {Badge, Divider, Tag, Image} from "antd"; import {DownCircleOutlined} from "@ant-design/icons"; import autoAnimate from "@formkit/auto-animate"; import { format } from "date-fns"; @@ -43,9 +42,13 @@ const Transaction = ({show, orderData, location}) => { Total Harga Rp.{orderData?.total} - {orderData?.payment_method?.toLowerCase() == "gopay" && ( + {orderData?.payment_method?.toLowerCase() == "gopay" ? (
- + +
+ ) : ( +
+
)}