fix: format time and image

This commit is contained in:
2022-11-15 10:58:29 +07:00
parent e4d533dd18
commit 7e5f71d345
3 changed files with 14 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ import Ask from "../../../components/Ask";
import Location from "../../../components/Location";
import DownloadApps from "../../../components/DownloadApps";
import Sheet from 'react-modal-sheet';
import Countdown from "react-countdown";
import Countdown, { zeroPad } from "react-countdown";
import {useRouter} from "next/router";
import BottomSheet from "../../../components/BottomSheet";
import { botsRepository } from '../../../repository/bots';
@@ -38,7 +38,7 @@ const Payment = observer(() => {
if (completed) {
// router.push('/flash-screen');
} else {
return <span>{minutes}:{seconds}</span>;
return <span>{zeroPad(minutes)}:{zeroPad(seconds)}</span>;
}
};
@@ -72,11 +72,11 @@ const Payment = observer(() => {
<>
{isNotComplete ? (
<div className="flex items-center justify-center bg-[#FF4F34] h-10 text-base">
<span className={'text-white'}>Batas Penyelesaian Pesanan mu Habis</span>
<span className={'text-white'}>Selesaikan Pesananmu Dalam</span>
</div>
) : (
<div className="flex items-center justify-center bg-[#00AED6] h-10 text-base">
<span className={'text-white'}>Selesaikan Pesanan mu dalam <Countdown
<span className={'text-white'}>Batas Penyelesaian Pesanan mu Habis<Countdown
date={Date.now() + 300000}
renderer={renderer}
onComplete={() => {
@@ -194,7 +194,7 @@ const Payment = observer(() => {
<BottomSheet onOpen={openOrderOut} onClose={() => setOpenOrderOut(false)}>
<div className={'px-5 max-w-lg'}>
<div className={'flex justify-center'}>
<Image src={'/assets/images/illustration-order-out.svg'} width={200} height={200}
<Image src={'/assets/images/Illustration-order-out.svg'} width={200} height={200}
alt={'confirmation'}/>
</div>