Fix formatting and React hook dependency lint errors
Fix max-len violations by breaking long lines across multiple lines. Fix react-hooks/exhaustive-deps by adding missing deps and removing unnecessary ones. Remove stale eslint-disable comments in DataTable stories. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -111,7 +111,7 @@ export default function ActivateAccountPage() {
|
||||
});
|
||||
},
|
||||
});
|
||||
}, [__, toast, activateAccount, navigate, safeContinueUrl, searchParams]);
|
||||
}, [__, toast, activateAccount, navigate, safeContinueUrl]);
|
||||
|
||||
useEffect(() => {
|
||||
const token = searchParams.get("token");
|
||||
|
||||
@@ -80,13 +80,14 @@ export function CompliancePageMailingListPage(props: {
|
||||
|
||||
const [replyTo, setReplyTo] = useState(mailingList?.replyTo ?? "");
|
||||
|
||||
const [updateMailingList, isUpdating] = useMutationWithToasts<CompliancePageMailingListPage_updateMailingListMutation>(
|
||||
updateMailingListMutation,
|
||||
{
|
||||
successMessage: __("Mailing list updated successfully"),
|
||||
errorMessage: __("Failed to update mailing list"),
|
||||
},
|
||||
);
|
||||
const [updateMailingList, isUpdating]
|
||||
= useMutationWithToasts<CompliancePageMailingListPage_updateMailingListMutation>(
|
||||
updateMailingListMutation,
|
||||
{
|
||||
successMessage: __("Mailing list updated successfully"),
|
||||
errorMessage: __("Failed to update mailing list"),
|
||||
},
|
||||
);
|
||||
|
||||
const handleSaveReplyTo = () => {
|
||||
if (!mailingListId) return;
|
||||
|
||||
@@ -245,7 +245,10 @@ function ExternalUrlRow(props: {
|
||||
onDragEnd: () => void;
|
||||
onEdit: (node: UrlNode) => void;
|
||||
}) {
|
||||
const { node, canEdit, connectionId, isDragging, isDropTarget, onDragStart, onDragOver, onDrop, onDragEnd, onEdit } = props;
|
||||
const {
|
||||
node, canEdit, connectionId, isDragging, isDropTarget,
|
||||
onDragStart, onDragOver, onDrop, onDragEnd, onEdit,
|
||||
} = props;
|
||||
const { __ } = useTranslate();
|
||||
const [isMouseDown, setIsMouseDown] = useState(false);
|
||||
|
||||
@@ -361,7 +364,14 @@ export function CompliancePageExternalUrlsSection(props: {
|
||||
const draggedId = draggedEdge.node.id;
|
||||
|
||||
await updateRank({
|
||||
variables: { input: { id: draggedId, name: draggedEdge.node.name, url: draggedEdge.node.url, rank: targetRank } },
|
||||
variables: {
|
||||
input: {
|
||||
id: draggedId,
|
||||
name: draggedEdge.node.name,
|
||||
url: draggedEdge.node.url,
|
||||
rank: targetRank,
|
||||
},
|
||||
},
|
||||
updater: (store) => {
|
||||
const connection = store.get(connectionId);
|
||||
if (!connection) return;
|
||||
|
||||
@@ -147,7 +147,11 @@ export function DocumentLayout(props: { queryRef: PreloadedQuery<DocumentLayoutQ
|
||||
</Button>
|
||||
)}
|
||||
<DocumentVersionsDropdown />
|
||||
<DocumentActionsDropdownn documentFragmentRef={document} versionFragmentRef={currentVersion} onRefetch={onRefetch} />
|
||||
<DocumentActionsDropdownn
|
||||
documentFragmentRef={document}
|
||||
versionFragmentRef={currentVersion}
|
||||
onRefetch={onRefetch}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ function WebhookEventsDialog({
|
||||
useEffect(() => {
|
||||
void loadEvents();
|
||||
dialogRef.current?.open();
|
||||
}, [loadEvents]);
|
||||
}, [loadEvents, dialogRef]);
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
|
||||
@@ -465,7 +465,10 @@ type AddApplicabilityStatementDialogProps = {
|
||||
onClose?: () => void;
|
||||
};
|
||||
|
||||
export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatementDialogRef, AddApplicabilityStatementDialogProps>(
|
||||
export const AddApplicabilityStatementDialog = forwardRef<
|
||||
AddApplicabilityStatementDialogRef,
|
||||
AddApplicabilityStatementDialogProps
|
||||
>(
|
||||
({ onClose }, ref) => {
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { type FC, Fragment, useState } from "react";
|
||||
// eslint-disable-next-line import-x/no-unresolved -- storybook v10 subpath export
|
||||
import { fn } from "storybook/test";
|
||||
|
||||
import { Badge } from "../../Atoms/Badge/Badge";
|
||||
@@ -16,7 +15,7 @@ export default {
|
||||
title: "Atoms/DataTable/Cells",
|
||||
component: Fragment as Component,
|
||||
argTypes: {},
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- fn type unresolvable due to storybook/test subpath
|
||||
|
||||
args: { onUpdate: fn() as (key: string, value: unknown) => void },
|
||||
} satisfies Meta<Component>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user