fix: format time and image

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

2
.env
View File

@ -1,2 +1,2 @@
# NEXT_PUBLIC_BASE_URL=https://api-staging.cariparkir.co.id
NEXT_PUBLIC_BASE_URL=https://d2cc-101-255-119-166.ap.ngrok.io
NEXT_PUBLIC_BASE_URL=http://localhost:8008

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>

View File

@ -295,9 +295,14 @@
dependencies:
"glob" "7.1.7"
"@next/swc-win32-x64-msvc@12.2.2":
"integrity" "sha512-2D2iinWUL6xx8D9LYVZ5qi7FP6uLAoWymt8m8aaG2Ld/Ka8/k723fJfiklfuAcwOxfufPJI+nRbT5VcgHGzHAQ=="
"resolved" "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.2.tgz"
"@next/swc-linux-x64-gnu@12.2.2":
"integrity" "sha512-ir1vNadlUDj7eQk15AvfhG5BjVizuCHks9uZwBfUgT5jyeDCeRvaDCo1+Q6+0CLOAnYDR/nqSCvBgzG2UdFh9A=="
"resolved" "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.2.tgz"
"version" "12.2.2"
"@next/swc-linux-x64-musl@12.2.2":
"integrity" "sha512-bte5n2GzLN3O8JdSFYWZzMgEgDHZmRz5wiispiiDssj4ik3l8E7wq/czNi8RmIF+ioj2sYVokUNa/ekLzrESWw=="
"resolved" "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.2.tgz"
"version" "12.2.2"
"@nodelib/fs.scandir@2.1.5":