Fix apps/console lint issues

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-22 12:51:08 +04:00
parent b4a73f2eea
commit dd23449cc0
244 changed files with 7685 additions and 8029 deletions

View File

@@ -81,7 +81,7 @@ export function EditableTable<
))}
<CellHead />
</Row>
{props.items.map((item) => (
{props.items.map(item => (
<EditableRow onUpdate={(k, v) => update(item.id, k, v)} key={item.id}>
{props.row({
item,
@@ -91,18 +91,20 @@ export function EditableTable<
<Cell>{props.action({ item })}</Cell>
</EditableRow>
))}
{showAdd ? (
<NewItemRow
schema={props.schema}
defaultValue={props.defaultValue}
connectionId={props.connectionId}
row={props.row}
mutation={props.createMutation}
onSuccess={toggleAdd}
/>
) : (
<RowButton onClick={toggleAdd} type="button">{props.addLabel}</RowButton>
)}
{showAdd
? (
<NewItemRow
schema={props.schema}
defaultValue={props.defaultValue}
connectionId={props.connectionId}
row={props.row}
mutation={props.createMutation}
onSuccess={toggleAdd}
/>
)
: (
<RowButton onClick={toggleAdd} type="button">{props.addLabel}</RowButton>
)}
</SortableDataTable>
);
}
@@ -144,7 +146,7 @@ function NewItemRow<T extends { id: string }, S extends z.ZodSchema>(props: {
disabled={!isOk || isMutating}
variant="tertiary"
className={clsx(isOk ? "text-txt-success" : "text-txt-secondary")}
onClick={onSubmit}
onClick={() => void onSubmit()}
>
{isMutating ? <Spinner size={16} /> : <IconCheckmark1 size={16} />}
</Button>

View File

@@ -79,7 +79,8 @@ export function GraphQLCell<Q extends OperationType, T extends NonNullable<unkno
value={value}
itemRenderer={props.itemRenderer}
/>
</div>{" "}
</div>
{" "}
{props.multiple && (
<Command.Input
className={classNames.input()}
@@ -88,11 +89,11 @@ export function GraphQLCell<Q extends OperationType, T extends NonNullable<unkno
)}
<Command.List>
<Suspense
fallback={
fallback={(
<div className="py-2 px-3 flex items-center justify-center">
<Spinner />
</div>
}
)}
>
<ItemList
{...props}
@@ -121,8 +122,8 @@ function ItemList<Q extends OperationType, T>(
return (
<>
{items
.filter((item) => !props.usedKeys.has(getKey(item) ?? ""))
.map((item) => (
.filter(item => !props.usedKeys.has(getKey(item) ?? ""))
.map(item => (
<Command.Item
key={getKey(item)}
className={props.className}

View File

@@ -18,9 +18,8 @@ export function PeopleCell(props: Props) {
organizationId: props.organizationId,
filter: { excludeContractEnded: true },
}}
items={(data) =>
data.organization?.peoples?.edges.map((edge) => edge.node) ?? []
}
items={data =>
data.organization?.peoples?.edges.map(edge => edge.node) ?? []}
itemRenderer={({ item }) => (
<div className="flex gap-2 whitespace-nowrap items-center text-xs">
<Avatar name={item.fullName} />

View File

@@ -26,9 +26,8 @@ export function VendorsCell(props: Props) {
variables={{
organizationId: props.organizationId,
}}
items={(data) =>
data.organization?.vendors?.edges?.map((edge) => edge.node) ?? []
}
items={data =>
data.organization?.vendors?.edges?.map(edge => edge.node) ?? []}
itemRenderer={({ item, onRemove }) => (
<VendorBadge vendor={item} onRemove={onRemove} />
)}