Fix lint findings on upgraded console pages
Wrap the usePreloadedQuery calls whose explicit type arguments pushed them past the 120-character limit, and merge the two duplicate @probo/helpers imports in FrameworkControlPage into one. These were flagged by reviewdog on the dependency-upgrade PR. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -70,7 +70,10 @@ export default function CreateCsvAccessReviewSourcePage({
|
|||||||
|
|
||||||
usePageTitle(__("Add CSV Access Source"));
|
usePageTitle(__("Add CSV Access Source"));
|
||||||
|
|
||||||
const { organization } = usePreloadedQuery<CreateCsvAccessReviewSourcePageQuery>(createCsvAccessReviewSourcePageQuery, queryRef);
|
const { organization } = usePreloadedQuery<CreateCsvAccessReviewSourcePageQuery>(
|
||||||
|
createCsvAccessReviewSourcePageQuery,
|
||||||
|
queryRef,
|
||||||
|
);
|
||||||
if (organization.__typename !== "Organization") {
|
if (organization.__typename !== "Organization") {
|
||||||
throw new Error("Organization not found");
|
throw new Error("Organization not found");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,10 @@ export default function AccessReviewSourcesTab({ queryRef }: Props) {
|
|||||||
const [searchParams, setSearchParams] = useSearchParams();
|
const [searchParams, setSearchParams] = useSearchParams();
|
||||||
const processedConnectorIdRef = useRef<string | null>(null);
|
const processedConnectorIdRef = useRef<string | null>(null);
|
||||||
|
|
||||||
const { organization, accessReviewDrivers } = usePreloadedQuery<AccessReviewSourcesTabQuery>(accessReviewSourcesTabQuery, queryRef);
|
const { organization, accessReviewDrivers } = usePreloadedQuery<AccessReviewSourcesTabQuery>(
|
||||||
|
accessReviewSourcesTabQuery,
|
||||||
|
queryRef,
|
||||||
|
);
|
||||||
if (organization.__typename !== "Organization") {
|
if (organization.__typename !== "Organization") {
|
||||||
throw new Error("Organization not found");
|
throw new Error("Organization not found");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
import {
|
import {
|
||||||
formatError,
|
formatError,
|
||||||
getControlMaturityLevelLabel,
|
getControlMaturityLevelLabel,
|
||||||
|
promisifyMutation,
|
||||||
} from "@probo/helpers";
|
} from "@probo/helpers";
|
||||||
import { promisifyMutation } from "@probo/helpers";
|
|
||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import {
|
import {
|
||||||
ActionDropdown,
|
ActionDropdown,
|
||||||
|
|||||||
@@ -138,7 +138,10 @@ export default function StatementOfApplicabilityDetailPage(props: Props) {
|
|||||||
statementOfApplicabilityId: string;
|
statementOfApplicabilityId: string;
|
||||||
}>();
|
}>();
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const data = usePreloadedQuery<StatementOfApplicabilityDetailPageQuery>(statementOfApplicabilityDetailPageQuery, props.queryRef);
|
const data = usePreloadedQuery<StatementOfApplicabilityDetailPageQuery>(
|
||||||
|
statementOfApplicabilityDetailPageQuery,
|
||||||
|
props.queryRef,
|
||||||
|
);
|
||||||
const statementOfApplicability = data.node;
|
const statementOfApplicability = data.node;
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|||||||
@@ -92,7 +92,10 @@ export default function StatementsOfApplicabilityPage({
|
|||||||
|
|
||||||
usePageTitle(__("Statements of Applicability"));
|
usePageTitle(__("Statements of Applicability"));
|
||||||
|
|
||||||
const { organization } = usePreloadedQuery<StatementsOfApplicabilityPageQuery>(statementsOfApplicabilityPageQuery, queryRef);
|
const { organization } = usePreloadedQuery<StatementsOfApplicabilityPageQuery>(
|
||||||
|
statementsOfApplicabilityPageQuery,
|
||||||
|
queryRef,
|
||||||
|
);
|
||||||
|
|
||||||
if (organization.__typename !== "Organization") {
|
if (organization.__typename !== "Organization") {
|
||||||
throw new Error("Organization not found");
|
throw new Error("Organization not found");
|
||||||
|
|||||||
Reference in New Issue
Block a user