Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { usePDP } from "@faststore/core";
import { Button as UIButton, ButtonProps } from "@faststore/ui";
import { ButtonProps, Button as UIButton } from "@faststore/ui";
import { priceFormatter } from "../../utils/priceFormatter";

import styles from "./buy-button-with-details.module.scss";
Expand All @@ -12,7 +12,7 @@ export function BuyButtonWithDetails(props: ButtonProps) {

// We will show one of the installments option available if the product has interest free (You should go further and show all available installments options)
const installment = context?.data?.product?.availableInstallments[0];
const interestFree = installment.installmentInterest === 0 ?? false;
const interestFree = installment?.installmentInterest === 0;

return (
<section className={styles.buyButtonWithDetails}>
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down