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:
+3
-4
@@ -77,7 +77,7 @@ function renderSection(client: QueryClient) {
|
||||
|
||||
function seededClient() {
|
||||
const client = createTestQueryClient();
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
client.setQueryData(brokerageAccountsQueryKey, [
|
||||
{
|
||||
id: "account-1",
|
||||
@@ -85,7 +85,7 @@ function seededClient() {
|
||||
openedOn: null,
|
||||
type: "BROKERAGE",
|
||||
},
|
||||
/* eslint-enable unicorn/no-null */
|
||||
|
||||
]);
|
||||
client.setQueryData(portfolioQueryKey, { source: "previous-connection" });
|
||||
client.setQueryData(stockQueryKey, { source: "previous-connection" });
|
||||
@@ -157,10 +157,9 @@ describe("TbankConnectionSection", () => {
|
||||
|
||||
return reads === 1
|
||||
? HttpResponse.json({ code: "TBANK_UNAVAILABLE" }, { status: 503 })
|
||||
/* eslint-disable unicorn/no-null -- Fixture preserves the production contract’s explicit null values. */
|
||||
|
||||
: HttpResponse.json(
|
||||
{ connected: false, connectedAt: null },
|
||||
/* eslint-enable unicorn/no-null */
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -12,12 +12,8 @@ const TbankConnectionSection: FC = () => {
|
||||
if (viewModel.state === "loading") return <TbankConnectionLoading />;
|
||||
|
||||
return viewModel.state === "error"
|
||||
? (
|
||||
<TbankConnectionError retry={viewModel.retry} />
|
||||
)
|
||||
: (
|
||||
<TbankConnectionSectionLoaded {...viewModel} />
|
||||
);
|
||||
? <TbankConnectionError retry={viewModel.retry} />
|
||||
: <TbankConnectionSectionLoaded {...viewModel} />;
|
||||
};
|
||||
|
||||
export { TbankConnectionSection };
|
||||
|
||||
+1
-3
@@ -129,9 +129,7 @@ const TbankConnectionSectionLoaded: FC<TbankConnectionSectionLoadedProps> = (
|
||||
<Stack>
|
||||
<Text>{t("tbank.deleteText")}</Text>
|
||||
|
||||
{remove.isError && (
|
||||
<Alert color="red">{t("tbank.requestError")}</Alert>
|
||||
)}
|
||||
{remove.isError && <Alert color="red">{t("tbank.requestError")}</Alert>}
|
||||
|
||||
<Button
|
||||
color="red"
|
||||
|
||||
-1
@@ -59,7 +59,6 @@ function useTbankConnectionSectionLoadedVm(
|
||||
commitTbankConnectionBoundary(queryClient, {
|
||||
connected: false,
|
||||
connectedAt:
|
||||
// eslint-disable-next-line unicorn/no-null -- The disconnected API snapshot requires a null connection timestamp.
|
||||
null,
|
||||
});
|
||||
setIsDeleteOpened(false);
|
||||
|
||||
Reference in New Issue
Block a user