refactor: improve Revolut QR code styling and amount format
- Move styling classes (padding, background, border) directly to QRCode component - Keep amount in cents as integer instead of converting to decimal (Revolut API expects cents) - Fix URL template string (remove extra closing brace) - Remove empty line for cleaner code - Add space between size and className attributes Amount format: from (monthlyExpense / 100).toFixed(2) to monthlyExpense.toFixed(0) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -148,12 +148,12 @@ export const ViewLocationCard:FC<ViewLocationCardProps> = ({location, userSettin
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
userSettings?.enableRevolutPayment && tenantPaymentMethod === "revolut" ? (() => {
|
userSettings?.enableRevolutPayment && tenantPaymentMethod === "revolut" ? (() => {
|
||||||
const revolutPaymentUrl = `https://revolut.me/${userSettings.ownerRevolutProfileName?.replace('@', '')}?amount=${(monthlyExpense / 100).toFixed(2)}¤cy=${userSettings.currency}}`;
|
const revolutPaymentUrl = `https://revolut.me/${userSettings.ownerRevolutProfileName?.replace('@', '')}?amount=${(monthlyExpense).toFixed(0)}¤cy=${userSettings.currency}`;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<p className="max-w-[25em] ml-1 mt-1 mb-1">{t("payment-info-header")}</p>
|
<p className="max-w-[25em] ml-1 mt-1 mb-1">{t("payment-info-header")}</p>
|
||||||
<div className="flex justify-center p-4 bg-white border border-gray-300 rounded-box">
|
<div className="flex justify-center">
|
||||||
<QRCode value={revolutPaymentUrl} size={200} />
|
<QRCode value={revolutPaymentUrl} size={200} className="p-4 bg-white border border-gray-300 rounded-box" />
|
||||||
</div>
|
</div>
|
||||||
<p className="text-center mt-1 mb-3">
|
<p className="text-center mt-1 mb-3">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
Reference in New Issue
Block a user