refactor: address frontend review feedback
Frontend verify / commits (pull_request) Successful in 29s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 8m54s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 12s
Frontend verify / verify (push) Successful in 9m59s
Frontend verify / commits (pull_request) Successful in 29s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 8m54s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 12s
Frontend verify / verify (push) Successful in 9m59s
This commit was merged in pull request #43.
This commit is contained in:
@@ -27,8 +27,6 @@ const LocationProbe = () => {
|
||||
const uid = "e6123145-9665-43e0-8413-cd61b8aa9b13";
|
||||
const money = (value: string) => ({ currency: "RUB", value });
|
||||
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
const bond
|
||||
= {
|
||||
aci: money("12"),
|
||||
@@ -52,7 +50,6 @@ const bond
|
||||
ticker: "TEST",
|
||||
};
|
||||
|
||||
/* eslint-enable unicorn/no-null */
|
||||
const position = {
|
||||
absoluteReturn: money("1000"),
|
||||
accounts: [
|
||||
@@ -74,8 +71,6 @@ const position = {
|
||||
returnPercent: "50",
|
||||
};
|
||||
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
const quote
|
||||
= {
|
||||
aci: money("12"),
|
||||
@@ -90,7 +85,6 @@ const quote
|
||||
unavailable: [],
|
||||
};
|
||||
|
||||
/* eslint-enable unicorn/no-null */
|
||||
function setup(
|
||||
options: {
|
||||
ambiguousTicker?: boolean;
|
||||
@@ -122,7 +116,7 @@ function setup(
|
||||
requests.push(new URL(request.url));
|
||||
|
||||
return HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{
|
||||
coupon: money("32.88"),
|
||||
@@ -158,7 +152,6 @@ function setup(
|
||||
unavailable:
|
||||
options.ratingState === "unavailable" ? ["rating"] : [],
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
);
|
||||
}),
|
||||
@@ -179,7 +172,7 @@ function setup(
|
||||
);
|
||||
if (params.section === "candles")
|
||||
return HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{
|
||||
candles: [
|
||||
@@ -193,7 +186,6 @@ function setup(
|
||||
historyFrom: null,
|
||||
observedAt: quote.observedAt,
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
);
|
||||
if (options.failCoupons)
|
||||
@@ -203,7 +195,7 @@ function setup(
|
||||
);
|
||||
|
||||
return HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{
|
||||
coupons: [
|
||||
@@ -235,7 +227,6 @@ function setup(
|
||||
positionIsStale: false,
|
||||
to: "2027-09-10",
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
);
|
||||
}),
|
||||
@@ -245,7 +236,7 @@ function setup(
|
||||
const isNext = url.searchParams.has("cursor");
|
||||
|
||||
return HttpResponse.json(
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
resource(
|
||||
{
|
||||
accountId: "all",
|
||||
@@ -268,7 +259,6 @@ function setup(
|
||||
nextCursor: isNext ? null : "next",
|
||||
observedAt: quote.observedAt,
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
||||
@@ -172,17 +172,11 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
|
||||
</Group>
|
||||
|
||||
<Group gap="xs" mt="md">
|
||||
{!!bond.floatingCoupon && (
|
||||
<Badge variant="light">{t("bond.floatingCoupon")}</Badge>
|
||||
)}
|
||||
{!!bond.floatingCoupon && <Badge variant="light">{t("bond.floatingCoupon")}</Badge>}
|
||||
|
||||
{!!bond.amortization && (
|
||||
<Badge variant="light">{t("bond.amortization")}</Badge>
|
||||
)}
|
||||
{!!bond.amortization && <Badge variant="light">{t("bond.amortization")}</Badge>}
|
||||
|
||||
{!!bond.perpetual && (
|
||||
<Badge variant="light">{t("bond.perpetual")}</Badge>
|
||||
)}
|
||||
{!!bond.perpetual && <Badge variant="light">{t("bond.perpetual")}</Badge>}
|
||||
|
||||
{!!bond.subordinated && (
|
||||
<Badge color="orange" variant="light">
|
||||
@@ -414,9 +408,7 @@ const BondCoupons: FC<BondPageViewProps> = (props) => {
|
||||
/>
|
||||
))
|
||||
)
|
||||
: (
|
||||
<Text c="dimmed">{t("bond.noCoupons")}</Text>
|
||||
)}
|
||||
: <Text c="dimmed">{t("bond.noCoupons")}</Text>}
|
||||
|
||||
<Text c="dimmed" size="xs">
|
||||
{t("bond.couponWindow", {
|
||||
@@ -452,9 +444,7 @@ const BondCoupons: FC<BondPageViewProps> = (props) => {
|
||||
/>
|
||||
))
|
||||
)
|
||||
: (
|
||||
<Text c="dimmed">{t("bond.noCoupons")}</Text>
|
||||
)}
|
||||
: <Text c="dimmed">{t("bond.noCoupons")}</Text>}
|
||||
</Stack>
|
||||
</Accordion.Panel>
|
||||
</Accordion.Item>
|
||||
|
||||
@@ -91,7 +91,6 @@ function useBondPageVm() {
|
||||
|
||||
return {
|
||||
averageLine:
|
||||
// eslint-disable-next-line unicorn/no-null -- Preserve the nullable domain value consumed by this view model.
|
||||
null,
|
||||
bond: bond.data,
|
||||
bondState: section(bond, uid ? sync.retry : () => bond.refetch()),
|
||||
@@ -100,7 +99,7 @@ function useBondPageVm() {
|
||||
canonicalTo:
|
||||
bond.data?.slug && bond.data.slug !== bondId
|
||||
? `/bonds/${encodeURIComponent(bond.data.slug)}${search}`
|
||||
: null, // eslint-disable-line unicorn/no-null -- Preserve the nullable domain value consumed by this view model.
|
||||
: null,
|
||||
chartData,
|
||||
code: apiErrorCode(bond.error),
|
||||
coupons: coupons.data,
|
||||
@@ -111,12 +110,12 @@ function useBondPageVm() {
|
||||
logoName:
|
||||
item.logoName
|
||||
?? bond.data?.logoName
|
||||
// eslint-disable-next-line unicorn/no-null -- Preserve the nullable domain value consumed by this view model.
|
||||
|
||||
?? null,
|
||||
ticker:
|
||||
item.ticker
|
||||
?? bond.data?.ticker
|
||||
// eslint-disable-next-line unicorn/no-null -- Preserve the nullable domain value consumed by this view model.
|
||||
|
||||
?? null,
|
||||
})) ?? [],
|
||||
filter,
|
||||
|
||||
Reference in New Issue
Block a user