Skip to content

Commit 8459e7b

Browse files
chore: unused code & exports
1 parent 3523f81 commit 8459e7b

File tree

5 files changed

+7
-28
lines changed

5 files changed

+7
-28
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ function CreateLoanTab({ market, api, rChainId }: CreateLoanProps) {
4545
)
4646
}
4747

48-
export const LendCreateTabsNewMenu = [
48+
const LendCreateTabsNewMenu = [
4949
{ value: 'create', label: t`Borrow`, component: CreateLoanTab },
5050
] satisfies FormTab<CreateLoanProps>[]
5151

52-
export const LendCreateTabsOldMenu = [
52+
const LendCreateTabsOldMenu = [
5353
{ value: 'create', label: t`Create Loan`, component: LoanFormCreate },
5454
{
5555
value: 'leverage',

apps/main/src/lend/components/PageLoanManage/ManageLoanTabs.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ import { type FormTab, FormTabs } from '@ui-kit/shared/ui/FormTabs/FormTabs'
1818

1919
type ManageLoanProps = PageContentProps<MarketUrlParams>
2020

21-
export const ImproveHealthTab = ({ rChainId, rOwmId }: ManageLoanProps) => (
21+
const ImproveHealthTab = ({ rChainId, rOwmId }: ManageLoanProps) => (
2222
<ImproveHealth {...useImproveHealthTab({ chainId: rChainId, network: networks[rChainId], marketId: rOwmId })} />
2323
)
2424

25-
export const ClosePositionTab = ({ rChainId, rOwmId }: ManageLoanProps) => (
25+
const ClosePositionTab = ({ rChainId, rOwmId }: ManageLoanProps) => (
2626
<ClosePosition {...useClosePositionTab({ chainId: rChainId, network: networks[rChainId], marketId: rOwmId })} />
2727
)
2828

29-
export const LendManageLegacyMenu = [
29+
const LendManageLegacyMenu = [
3030
{
3131
value: 'loan',
3232
label: t`Borrow`,
@@ -52,7 +52,7 @@ export const LendManageLegacyMenu = [
5252
},
5353
] satisfies FormTab<ManageLoanProps>[]
5454

55-
export const LendManageNewMenu = [
55+
const LendManageNewMenu = [
5656
{
5757
value: 'borrow',
5858
label: ({ market }) => (market?.leverage?.hasLeverage() ? t`Leverage` : t`Borrow`),
@@ -76,7 +76,7 @@ export const LendManageNewMenu = [
7676
},
7777
] satisfies FormTab<ManageLoanProps>[]
7878

79-
export const LendManageSoftLiquidationMenu = [
79+
const LendManageSoftLiquidationMenu = [
8080
{
8181
value: 'soft-liquidation',
8282
label: t`Manage soft liquidation`,

apps/main/src/lend/components/PageLoanManage/Page.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import CampaignRewardsBanner from '@/lend/components/CampaignRewardsBanner'
44
import { MarketInformationComp } from '@/lend/components/MarketInformationComp'
55
import { MarketInformationTabs } from '@/lend/components/MarketInformationTabs'
66
import { ManageLoanTabs } from '@/lend/components/PageLoanManage/ManageLoanTabs'
7-
import type { DetailInfoTypes } from '@/lend/components/PageLoanManage/types'
87
import { useOneWayMarket } from '@/lend/entities/chain'
98
import { useBorrowPositionDetails } from '@/lend/hooks/useBorrowPositionDetails'
109
import { useLendPageTitle } from '@/lend/hooks/useLendPageTitle'
@@ -88,12 +87,6 @@ const Page = () => {
8887
const isInSoftLiquidation =
8988
borrowPositionDetails.liquidationAlert.softLiquidation || borrowPositionDetails.liquidationAlert.hardLiquidation
9089

91-
// set tabs
92-
const DETAIL_INFO_TYPES: { key: DetailInfoTypes; label: string }[] = [{ label: t`Market Details`, key: 'market' }]
93-
if (signerAddress) {
94-
DETAIL_INFO_TYPES.push({ label: t`Your Details`, key: 'user' })
95-
}
96-
9790
useEffect(() => {
9891
if (api && market && isPageVisible) {
9992
if (loanExists) setMarketsStateKey('marketDetailsView', 'user')

apps/main/src/lend/types/lend.types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ export type ExpectedBorrowed = {
8080
avgPrice: string
8181
}
8282

83-
export type VaultCreateFormType = 'create' | 'leverage'
84-
export type VaultDepositFormType = 'deposit' | 'stake'
85-
export type VaultWithdrawFormType = 'withdraw' | 'unstake' | 'claim'
86-
export type VaultManageFormType = 'loan' | 'collateral'
87-
export type RFormType = VaultCreateFormType | VaultDepositFormType | VaultWithdrawFormType | VaultManageFormType | ''
88-
8983
export type PageContentProps<T = UrlParams> = {
9084
params: T
9185
rChainId: ChainId

apps/main/src/lend/utils/helpers.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ export function getErrorMessage(error: CustomError, defaultErrorMessage: string)
3030
return errorMessage
3131
}
3232

33-
export function scrollToTop() {
34-
window.scroll({
35-
top: 0,
36-
left: 0,
37-
behavior: 'smooth',
38-
})
39-
}
40-
4133
export function fulfilledValue<T>(result: PromiseSettledResult<T>) {
4234
if (result.status === 'fulfilled') {
4335
return result.value

0 commit comments

Comments
 (0)