refactor: enforce frontend view model boundaries
This commit is contained in:
@@ -3,6 +3,7 @@ import { apiQueryClient, type paths, useResourceQuery } from "@/shared/api";
|
||||
type IncomeAnalytics = NonNullable<
|
||||
paths["/api/v1/brokerage-accounts/{accountId}/income-analytics"]["get"]["responses"][200]["content"]["application/json"]["data"]
|
||||
>;
|
||||
|
||||
type IncomeSummary = NonNullable<
|
||||
paths["/api/v1/brokerage-accounts/{accountId}/income-summary"]["get"]["responses"][200]["content"]["application/json"]["data"]
|
||||
>;
|
||||
@@ -28,7 +29,7 @@ function useIncomeAnalytics(
|
||||
});
|
||||
}
|
||||
|
||||
function useIncomeSummary(accountId: string | undefined) {
|
||||
function useIncomeSummary(accountId?: string) {
|
||||
return useResourceQuery({
|
||||
meta: { accessGroup: "brokerage" },
|
||||
...apiQueryClient.queryOptions(
|
||||
|
||||
Reference in New Issue
Block a user