refactor(converter): shared page layout + reusable conversion logic/UI
Pages: - add WalletLayout route (WalletHeader + main + Footer via <Outlet/>), wrap converter/swap/bridge/transactions; thin pages, drop duplicated shell CSS - extract SwapBridgeTabs shared between swap/bridge pages Converter reuse (FSD layers, no widget->widget imports): - move commission tiers to entities/commission (+ CommissionTable ui) - shared calc hook features/payment/model/useCurrencyConversion; useConverterSection becomes thin wrapper; HomePage Converter reuses it - move ConvertField/DirectionSwapButton to shared/ui; delete dead useConverter Tooling: - add eslint.config.js (ESLint 9 flat config); fix no-explicit-any in WalletPage Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
21
src/widgets/wallet-layout/ui/WalletLayout.tsx
Normal file
21
src/widgets/wallet-layout/ui/WalletLayout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Outlet } from 'react-router-dom'
|
||||
import { WalletHeader } from '@widgets/wallet-header'
|
||||
import { Footer } from '@widgets/footer'
|
||||
import styles from './WalletLayout.module.css'
|
||||
|
||||
interface Props {
|
||||
footer?: boolean
|
||||
center?: boolean
|
||||
}
|
||||
|
||||
export function WalletLayout({ footer = false, center = false }: Props) {
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<WalletHeader />
|
||||
<main className={center ? `${styles.main} ${styles.center}` : styles.main}>
|
||||
<Outlet />
|
||||
</main>
|
||||
{footer && <Footer />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user