refactor: clarify frontend module ownership
This commit is contained in:
@@ -7,19 +7,21 @@ import {
|
||||
Skeleton,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { LoadingSkeleton } from "@wealthledger/ui";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import {
|
||||
InstrumentChart,
|
||||
instrumentDetailsStyles,
|
||||
InstrumentEvents,
|
||||
InstrumentHeader,
|
||||
InstrumentMetric,
|
||||
InstrumentMetrics,
|
||||
InstrumentPage,
|
||||
InstrumentPosition,
|
||||
InstrumentPrice,
|
||||
InstrumentQuoteStatus,
|
||||
InstrumentTerms,
|
||||
} from "@/features/instrument-details";
|
||||
import {
|
||||
formatDate,
|
||||
@@ -75,11 +77,11 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
{t("bond.percentOfNominal")}
|
||||
</Text>
|
||||
|
||||
<Text className={instrumentDetailsStyles.price}>
|
||||
<InstrumentPrice>
|
||||
{vm.quote?.pricePercent == undefined
|
||||
? t("bond.unknown")
|
||||
: `${formatDecimal(vm.quote.pricePercent)} %`}
|
||||
</Text>
|
||||
</InstrumentPrice>
|
||||
|
||||
{vm.quote?.changePercentagePoints != undefined && (
|
||||
<Text fw={600}>
|
||||
@@ -131,7 +133,7 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack className={instrumentDetailsStyles.page} gap="lg">
|
||||
<InstrumentPage>
|
||||
<InstrumentHeader
|
||||
logoSrc={vm.logoSrc}
|
||||
name={bond.name}
|
||||
@@ -168,12 +170,9 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
</Text>
|
||||
)}
|
||||
|
||||
<div className={instrumentDetailsStyles.embeddedSection}>
|
||||
<Title mb="md" order={2} size="h3">
|
||||
{t("bond.terms")}
|
||||
</Title>
|
||||
<InstrumentTerms title={t("bond.terms")}>
|
||||
|
||||
<div className={instrumentDetailsStyles.metricsGrid}>
|
||||
<InstrumentMetrics>
|
||||
<InstrumentMetric
|
||||
label={t("bond.nominal")}
|
||||
value={formatMoney(bond.nominal)}
|
||||
@@ -191,8 +190,8 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
<InstrumentMetric label={t("bond.couponFrequency")} value={couponFrequency} />
|
||||
|
||||
<InstrumentMetric label={t("bond.lot")} value={lotSize} />
|
||||
</div>
|
||||
</div>
|
||||
</InstrumentMetrics>
|
||||
</InstrumentTerms>
|
||||
</InstrumentHeader>
|
||||
|
||||
<BondMetrics metrics={vm.metrics} state={vm.metricsState} />
|
||||
@@ -218,7 +217,7 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
incomeLabel={t("bond.coupons")}
|
||||
vm={vm}
|
||||
/>
|
||||
</Stack>
|
||||
</InstrumentPage>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user