Skip to content

Commit

Permalink
fixing conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusats committed Aug 2, 2023
1 parent adbcee0 commit 35cdee6
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/views/MicrocreditManager/MicrocreditManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,39 @@ const MicrocreditManager: React.FC<{ isLoading?: boolean }> = (props) => {
const { extractFromView } = usePrismicData();
const { update, getByKey } = useFilters();
const { title, content } = extractFromView('heading') as any;
const {
microcreditLimitReachTitle,
microcreditLimitReachMessage,
approveReject
} = extractFromView('messages') as any;

useEffect(() => {
if (!getByKey('tab')) {
update('tab', 'repayments');
}
}, []);



const { managerDetails } = useLoanManager();
const { managerDetails, isReady } = useLoanManager();

const limitReach =
managerDetails?.currentLentAmount >=
managerDetails?.currentLentAmountLimit;

return (
<ViewContainer {...({} as any)} isLoading={isLoading}>
<ViewContainer {...({} as any)} isLoading={isLoading || !isReady}>
{limitReach && (
<Alert
icon="alertCircle"
mb={1.5}
title="Microcredit limit reach"
message={`You microcredit limit of $${managerDetails?.currentLentAmountLimit} has been reached.`}
error
title={microcreditLimitReachTitle}
message={
<RichText
content={microcreditLimitReachMessage}
variables={{
limit: managerDetails?.currentLentAmountLimit
}}
/>
}
/>
)}
<Box
Expand Down Expand Up @@ -76,7 +85,7 @@ const MicrocreditManager: React.FC<{ isLoading?: boolean }> = (props) => {
}}
/>
<Tab
title="Approve/Reject"
title={approveReject}
onClick={() => {
update({
filter: '',
Expand All @@ -99,4 +108,4 @@ const MicrocreditManager: React.FC<{ isLoading?: boolean }> = (props) => {
);
};

export default MicrocreditManager;
export default MicrocreditManager;

0 comments on commit 35cdee6

Please sign in to comment.