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

@@ -1,4 +1,4 @@
import { useState, useEffect } from "react";
import { useState } from "react";
import {
Dialog,
DialogContent,
@@ -32,14 +32,9 @@ export function DeleteOrganizationDialog({
const handleConfirm = () => {
if (inputValue === organizationName) {
onConfirm();
}
};
useEffect(() => {
if (!isDeleting) {
setInputValue("");
}
}, [isDeleting]);
};
return (
<Dialog
@@ -52,7 +47,7 @@ export function DeleteOrganizationDialog({
<p className="text-txt-secondary text-sm">
{sprintf(
__("This will permanently delete the organization %s and all its data."),
organizationName
organizationName,
)}
</p>
@@ -62,12 +57,12 @@ export function DeleteOrganizationDialog({
<Field
label={sprintf(
__('To confirm deletion, type "%s" below:'),
organizationName
__("To confirm deletion, type \"%s\" below:"),
organizationName,
)}
type="text"
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
onChange={e => setInputValue(e.target.value)}
placeholder={organizationName}
disabled={isDeleting}
autoComplete="off"

View File

@@ -27,7 +27,7 @@ export function SlackConnections({
];
const slackConnections = slackConnectionDefinitions.map((def) => {
const connected = connectedSlackConnections.find((c) => c.id);
const connected = connectedSlackConnections.find(c => c.id);
return {
...def,
createdAt: connected?.createdAt,
@@ -49,7 +49,7 @@ export function SlackConnections({
return (
<div className="space-y-2">
{slackConnections.map((slackConnection) => (
{slackConnections.map(slackConnection => (
<Card
key={slackConnection.id}
padded
@@ -61,37 +61,41 @@ export function SlackConnections({
<div className="mr-auto">
<h3 className="text-base font-semibold">{slackConnection.name}</h3>
<p className="text-sm text-txt-tertiary">
{slackConnection.createdAt ? (
<>
{sprintf(
__("Connected on %s"),
dateTimeFormat(slackConnection.createdAt),
)}
{slackConnection.channel && (
{slackConnection.createdAt
? (
<>
{" • "}
{sprintf(__("Channel: %s"), slackConnection.channel)}
{sprintf(
__("Connected on %s"),
dateTimeFormat(slackConnection.createdAt),
)}
{slackConnection.channel && (
<>
{" • "}
{sprintf(__("Channel: %s"), slackConnection.channel)}
</>
)}
</>
)
: (
slackConnection.description
)}
</>
) : (
slackConnection.description
)}
</p>
</div>
{slackConnection.createdAt ? (
<div>
<Badge variant="success" size="md">
{__("Connected")}
</Badge>
</div>
) : (
canUpdate && (
<Button variant="secondary" asChild>
<a href={getUrl(slackConnection.id)}>{__("Connect")}</a>
</Button>
)
)}
{slackConnection.createdAt
? (
<div>
<Badge variant="success" size="md">
{__("Connected")}
</Badge>
</div>
)
: (
canUpdate && (
<Button variant="secondary" asChild>
<a href={getUrl(slackConnection.id)}>{__("Connect")}</a>
</Button>
)
)}
</Card>
))}
</div>