We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fdcb5f commit 95a43a0Copy full SHA for 95a43a0
src/pages/DonationPage/sections/MainComponent.tsx
@@ -10,6 +10,7 @@ import {
10
CharLimitTreshold,
11
PaymentPageConfigContext,
12
} from "../../../logic/PaymentPageConfig";
13
+import { toJS } from "mobx";
14
15
const MessageComponent = observer(({}) => {
16
const payment = useContext(PaymentStoreContext);
@@ -28,7 +29,7 @@ const MessageComponent = observer(({}) => {
28
29
const tresholds = pageConfig.charLimit.value as CharLimitTreshold[];
30
console.log({tresholds: tresholds}, "finding limits");
31
return (
- tresholds
32
+ toJS(tresholds)
33
.sort((a, b) => -(a.treshold - b.treshold))
34
.find((value) => value.treshold <= payment.amount)?.limit ?? 300
35
);
0 commit comments