Skip to content

Commit 4bb139b

Browse files
refactor: generic loan components
1 parent aa7cb13 commit 4bb139b

File tree

21 files changed

+695
-635
lines changed

21 files changed

+695
-635
lines changed

apps/main/src/lend/components/PageLoanCreate/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import networks from '@/lend/networks'
66
import useStore from '@/lend/store/useStore'
77
import { type MarketUrlParams, type PageContentProps } from '@/lend/types/lend.types'
88
import { getLoanCreatePathname } from '@/lend/utils/utilsRouter'
9-
import { BorrowTabContents } from '@/llamalend/features/borrow/components/BorrowTabContents'
9+
import { CreateLoanForm } from '@/llamalend/features/borrow/components/CreateLoanForm'
1010
import type { OnBorrowFormUpdate } from '@/llamalend/features/borrow/types'
1111
import Stack from '@mui/material/Stack'
1212
import { AppFormContentWrapper } from '@ui/AppForm'
1313
import { useNavigate } from '@ui-kit/hooks/router'
14-
import { useBorrowUnifiedForm } from '@ui-kit/hooks/useFeatureFlags'
14+
import { useCreateLoanMuiForm } from '@ui-kit/hooks/useFeatureFlags'
1515
import { t } from '@ui-kit/lib/i18n'
1616
import { TabsSwitcher, type TabOption } from '@ui-kit/shared/ui/TabsSwitcher'
1717
import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces'
@@ -40,7 +40,7 @@ const useOnFormUpdate = ({ api, market }: PageContentProps): OnBorrowFormUpdate
4040
const LoanCreate = (pageProps: PageContentProps & { params: MarketUrlParams }) => {
4141
const { rChainId, rOwmId, rFormType, market, params, api } = pageProps
4242
const push = useNavigate()
43-
const shouldUseBorrowUnifiedForm = useBorrowUnifiedForm()
43+
const shouldUseBorrowUnifiedForm = useCreateLoanMuiForm()
4444
const onUpdate = useOnFormUpdate(pageProps)
4545

4646
const onLoanCreated = useStore((state) => state.loanCreate.onLoanCreated)
@@ -82,7 +82,7 @@ const LoanCreate = (pageProps: PageContentProps & { params: MarketUrlParams }) =
8282
options={tabs}
8383
/>
8484
{shouldUseBorrowUnifiedForm ? (
85-
<BorrowTabContents
85+
<CreateLoanForm
8686
networks={networks}
8787
chainId={rChainId}
8888
market={market ?? undefined}

apps/main/src/llamalend/features/borrow/components/BorrowActionInfoAccordion.tsx

Lines changed: 0 additions & 144 deletions
This file was deleted.

apps/main/src/llamalend/features/borrow/components/BorrowFormAlert.tsx

Lines changed: 0 additions & 72 deletions
This file was deleted.

apps/main/src/llamalend/features/borrow/components/BorrowFormTokenInput.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)