-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PBI Transaction History #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good implementation, but there's some issue detected on SonarCloud. Might want to fix that first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like your code, but I think there is a slight room for improvement. Thank you for your effort!
{formatRupiah(price)} | ||
</td> | ||
<td className="p-2 border-2 border-emerald-500"> | ||
{dayjs(expiry_time).format('ddd, D MMM YY HH:mm')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are plenty of time in our projects that we use dayjs and format it to a certain format. I think it's better to make utils function for better code readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks for suggesting this, I have rafactored the code and make it more modular.
src/app/payment/PaymentDetail.tsx
Outdated
if (transactionErrorStatuses.includes(status ?? '')) | ||
return <PaymentError status={status ?? ''} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In here, is there really a case where status is null? If there are, I think you could define status as a type of possible values to reduce confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Thanks for pointing that outl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good! Good job.
In this PR, I have applied the transaction history feature for the app. I have applied this so that user can continue pending transaction that has not expired.