Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: resolve all TypeScript errors across api and web

Andrejb49fb25092fe
diff --git a/apps/api/src/auth.ts b/apps/api/src/auth.ts
index 08435c402..be5676826 100644
--- a/apps/api/src/auth.ts
+++ b/apps/api/src/auth.ts
@@ -361,7 +361,7 @@ export const auth = betterAuth({
// role's permissions are derived from the compiled-in defaults
// in `@kaneo/permissions`; admins can later replace them in the
// Roles UI. We skip names that somehow already exist (this hook
- // is best-effort idempotent — the boot-time backfill is the
+ // is best-effort idempotent; the boot-time backfill is the
// belt-and-braces path).
try {
const existing = await db
@@ -429,7 +429,6 @@ export const auth = betterAuth({
{
inviterEmail: data.inviter.user.email,
inviterName: data.inviter.user.name,
- locale,
workspaceName: data.organization.name,
invitationLink: inviteLink,
to: data.email,
@@ -521,13 +520,14 @@ export const auth = betterAuth({
}
// Allow the very first signup through even when registration
- // is disabled — that's the instance-admin bootstrap flow.
+ // is disabled: that's the instance-admin bootstrap flow.
// Otherwise a fresh instance with DISABLE_REGISTRATION=true
// could never be set up because `checkRegistrationAllowed`
// would reject the first user (qodo bot #3).
- const [{ value: existingUserCount }] = await db
+ const [userCountRow] = await db
.select({ value: count() })
.from(schema.userTable);
+ const existingUserCount = userCountRow?.value ?? 0;
if (existingUserCount === 0) {
return;
}
@@ -572,8 +572,8 @@ export const auth = betterAuth({
// transaction then sees totalUserCount > 1 and skips.
//
// Note: we count total users (not admins) so that upgrading
- // an existing instance — where every existing user has
- // role=NULL from the new column — doesn't promote the next
+ // an existing instance (where every existing user has
+ // role=NULL from the new column) doesn't promote the next
// signup to admin (qodo bot #4).
await db.transaction(async (tx) => {
await tx.execute(sql`SELECT pg_advisory_xact_lock(2026)`);
@@ -613,7 +613,7 @@ export const auth = betterAuth({
// shuts that path off without affecting self-hosted instances.
if (ctx.path === "/organization/invite-member" && isCloud()) {
// `before` hooks don't auto-populate ctx.context.session; load it
- // explicitly. `disableRefresh` keeps this gate cheap — we only need
+ // explicitly. `disableRefresh` keeps this gate cheap: we only need
// the user record, not a session refresh side-effect.
const session = await getSessionFromCtx(ctx, {
disableRefresh: true,
diff --git a/apps/api/src/gitea-integration/controllers/create-gitea-integration.ts b/apps/api/src/gitea-integration/controllers/create-gitea-integration.ts
index f83394ac6..389116c37 100644
--- a/apps/api/src/gitea-integration/controllers/create-gitea-integration.ts
+++ b/apps/api/src/gitea-integration/controllers/create-gitea-integration.ts
@@ -1,6 +1,7 @@
import { randomBytes } from "node:crypto";
import { and, eq } from "drizzle-orm";
import { HTTPException } from "hono/http-exception";
+import type { ContentfulStatusCode } from "hono/utils/http-status";
import db from "../../database";
import { integrationTable, projectTable } from "../../database/schema";
import {
@@ -74,7 +75,9 @@ async function createGiteaIntegration({
await client.getRepo(repositoryOwner, repositoryName);
} catch (error) {
if (error instanceof GiteaApiError) {
- throw new HTTPException(error.status || 400, { message: error.message });
+ throw new HTTPException((error.status || 400) as ContentfulStatusCode, {
+ message: error.message,
+ });
}
throw error;
}
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index 7c0ca43d6..dadbc6736 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -136,7 +136,7 @@ function buildContentDisposition(filename: string, inline: boolean) {
.normalize("NFKD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/[\\/]/g, "-")
- .replace(/[^\x20-\u7E]+/g, "_")
+ .replace(/[^\x20-\x7E]+/g, "_")
.replace(/\s+/g, " ")
.trim() || "file";
const encodedFilename = encodeURIComponent(safeFilename).replace(
@@ -414,7 +414,7 @@ export function createApp() {
});
// Better Auth serves GET /auth/device as JSON. Browsers that open the API URL
- // directly expect a page — redirect full document navigations to the web app.
+ // directly expect a page, so redirect full document navigations to the web app.
const authDeviceQuerySchema = v.object({
user_code: v.optional(v.string()),
ui: v.optional(v.picklist(["1"])),
@@ -485,9 +485,9 @@ export function createApp() {
api.on(["POST", "GET", "PUT", "DELETE"], "/auth/*", async (c) => {
const authHeader = c.req.header("Authorization");
const apiKeyHeader = c.req.header("x-api-key");
- const bearerMatch = authHeader?.match(/^Bearer\s+(\S+)$/i);
+ const bearerToken = authHeader?.match(/^Bearer\s+(\S+)$/i)?.[1];
- if (bearerMatch && !apiKeyHeader) {
+ if (bearerToken && !apiKeyHeader) {
const session = await auth.api.getSession({
headers: c.req.raw.headers,
});
@@ -500,7 +500,7 @@ export function createApp() {
const headers = new Headers(c.req.raw.headers);
// Better Auth API key plugin validates from x-api-key by default.
- headers.set("x-api-key", bearerMatch[1]);
+ headers.set("x-api-key", bearerToken);
return auth.handler(
new Request(c.req.raw, {
@@ -590,7 +590,7 @@ export function createApp() {
),
);
- // User-scoped WebSocket endpoint — MUST be registered before /ws/:projectId
+ // User-scoped WebSocket endpoint; MUST be registered before /ws/:projectId
// so the literal path "user" isn't consumed by the param route.
api.get(
"/ws/user",
@@ -625,7 +625,7 @@ export function createApp() {
if (raw) {
const msg = JSON.parse(raw) as { type?: string };
if (msg?.type === "ping") {
- // keepalive — no-op
+ // keepalive, no-op
}
}
} catch {
@@ -863,9 +863,11 @@ const {
oauthApi,
} = createdApp;
+const entrypoint = process.argv[1];
const isMainModule =
- Boolean(process.argv[1]) &&
- import.meta.url === pathToFileURL(process.argv[1]).href;
+ entrypoint !== undefined &&
+ entrypoint !== "" &&
+ import.meta.url === pathToFileURL(entrypoint).href;
if (isMainModule) {
void startServer(injectWebSocket);
diff --git a/apps/api/src/label/controllers/delete-label.ts b/apps/api/src/label/controllers/delete-label.ts
index 56d7ae885..3abd1cfde 100644
--- a/apps/api/src/label/controllers/delete-label.ts
+++ b/apps/api/src/label/controllers/delete-label.ts
@@ -79,6 +79,11 @@ async function deleteLabel(id: string, userId: string) {
});
}
+ // Label without a workspace: the cascade filter below could never match
+ if (label.workspaceId === null) {
+ return deletedLabel;
+ }
+
// Capture affected task-level labels before cascading so we have data
// for events and provider sync
const affectedLabels = await db
diff --git a/apps/api/src/plugins/generic-webhook/config.ts b/apps/api/src/plugins/generic-webhook/config.ts
index ba401dbfd..aac2c9b3a 100644
--- a/apps/api/src/plugins/generic-webhook/config.ts
+++ b/apps/api/src/plugins/generic-webhook/config.ts
@@ -8,7 +8,7 @@ function isDisallowedIpv4(ip: string): boolean {
return true;
}
- const [a, b] = parts;
+ const [a, b] = parts as [number, number, number, number];
return (
a === 0 ||
diff --git a/apps/api/src/plugins/telegram/index.ts b/apps/api/src/plugins/telegram/index.ts
index 29b39332b..26b72b978 100644
--- a/apps/api/src/plugins/telegram/index.ts
+++ b/apps/api/src/plugins/telegram/index.ts
@@ -18,5 +18,5 @@ export const telegramPlugin: IntegrationPlugin = {
onTaskTitleChanged: handleTaskTitleChanged,
onTaskDescriptionChanged: handleTaskDescriptionChanged,
onTaskCommentCreated: handleTaskCommentCreated,
- validateConfig: validateTelegramConfig,
+ validateConfig: async (config) => validateTelegramConfig(config),
};
diff --git a/apps/api/src/search/index.ts b/apps/api/src/search/index.ts
index 8d64afceb..6ceeb1e16 100644
--- a/apps/api/src/search/index.ts
+++ b/apps/api/src/search/index.ts
@@ -72,7 +72,7 @@ const search = new Hono<{
v.minValue(1, "Limit must be at least 1"),
v.maxValue(50, "Limit must not exceed 50"),
),
- 20,
+ "20",
),
userEmail: v.optional(v.pipe(v.string(), v.email())),
}),
diff --git a/apps/api/src/task/controllers/move-task.ts b/apps/api/src/task/controllers/move-task.ts
index c2ed832e2..52ada6f10 100644
--- a/apps/api/src/task/controllers/move-task.ts
+++ b/apps/api/src/task/controllers/move-task.ts
@@ -34,7 +34,9 @@ async function resolveDestinationStatus(
.where(eq(columnTable.projectId, destinationProjectId))
.orderBy(asc(columnTable.position));
- if (destinationColumns.length === 0) {
+ const [firstColumn] = destinationColumns;
+
+ if (!firstColumn) {
throw new HTTPException(400, {
message: "Destination project does not have a workflow",
});
@@ -54,7 +56,7 @@ async function resolveDestinationStatus(
(column) => column.slug === currentStatus,
);
- return requestedColumn ?? matchingCurrentColumn ?? destinationColumns[0];
+ return requestedColumn ?? matchingCurrentColumn ?? firstColumn;
}
async function getNextTaskPosition(
diff --git a/apps/api/src/task/controllers/require-task-permission.ts b/apps/api/src/task/controllers/require-task-permission.ts
index acdde7948..aeb8a8d45 100644
--- a/apps/api/src/task/controllers/require-task-permission.ts
+++ b/apps/api/src/task/controllers/require-task-permission.ts
@@ -5,7 +5,42 @@ import db from "../../database";
import { taskTable } from "../../database/schema";
import { requireWorkspacePermission } from "../../utils/require-workspace-permission";
-export async function requireBulkTaskPermission(c: Context, next: Next) {
+type TaskEnv = {
+ Variables: {
+ userId: string;
+ };
+};
+
+type BulkTaskOperation =
+ | "updateStatus"
+ | "updatePriority"
+ | "updateAssignee"
+ | "delete"
+ | "addLabel"
+ | "removeLabel"
+ | "updateDueDate";
+
+type BulkTaskContext = Context<
+ TaskEnv,
+ string,
+ { out: { json: { operation: BulkTaskOperation } } }
+>;
+
+type TaskAssigneeContext = Context<
+ TaskEnv,
+ string,
+ {
+ out: {
+ param: { id: string };
+ json: { userId?: string };
+ };
+ }
+>;
+
+export async function requireBulkTaskPermission(
+ c: BulkTaskContext,
+ next: Next,
+) {
const { operation } = c.req.valid("json");
if (operation === "delete") {
@@ -23,7 +58,10 @@ export async function requireBulkTaskPermission(c: Context, next: Next) {
return requireWorkspacePermission({ task: ["update"] })(c, next);
}
-export async function requireBulkTaskEntitlement(c: Context, next: Next) {
+export async function requireBulkTaskEntitlement(
+ c: BulkTaskContext,
+ next: Next,
+) {
const { operation } = c.req.valid("json");
if (
@@ -37,7 +75,10 @@ export async function requireBulkTaskEntitlement(c: Context, next: Next) {
return requireEntitlement(c, next);
}
-export async function requireTaskAssigneePermission(c: Context, next: Next) {
+export async function requireTaskAssigneePermission(
+ c: TaskAssigneeContext,
+ next: Next,
+) {
const { id } = c.req.valid("param");
const { userId } = c.req.valid("json");
const [existingTask] = await db
diff --git a/apps/api/src/task/controllers/update-task-assignee.ts b/apps/api/src/task/controllers/update-task-assignee.ts
index 6c6470e17..32df12b46 100644
--- a/apps/api/src/task/controllers/update-task-assignee.ts
+++ b/apps/api/src/task/controllers/update-task-assignee.ts
@@ -10,7 +10,7 @@ async function updateTaskAssignee({
currentUserId,
}: {
id: string;
- userId: string;
+ userId: string | null;
currentUserId: string;
}) {
const existingTask = await db.query.taskTable.findFirst({
diff --git a/apps/api/src/task/index.ts b/apps/api/src/task/index.ts
index ed75eb993..d984a02fe 100644
--- a/apps/api/src/task/index.ts
+++ b/apps/api/src/task/index.ts
@@ -850,6 +850,12 @@ const task = new Hono<{
id: assetTable.id,
});
+ if (!asset) {
+ throw new HTTPException(500, {
+ message: "Failed to save asset",
+ });
+ }
+
const apiBaseUrl = normalizeApiServerUrl(
process.env.KANEO_API_URL || new URL(c.req.url).origin,
);
diff --git a/apps/api/src/telegram-integration/controllers/telegram-controller.ts b/apps/api/src/telegram-integration/controllers/telegram-controller.ts
index f202fb0eb..4a3e1d35a 100644
--- a/apps/api/src/telegram-integration/controllers/telegram-controller.ts
+++ b/apps/api/src/telegram-integration/controllers/telegram-controller.ts
@@ -44,6 +44,7 @@ export function buildNextTelegramConfigFromPatch(
? currentConfig.chatLabel
: (body.chatLabel ?? undefined),
events: {
+ ...defaultTelegramEvents,
...(currentConfig.events ?? {}),
...(body.events ?? {}),
},
diff --git a/apps/api/src/utils/authenticate-api-request.ts b/apps/api/src/utils/authenticate-api-request.ts
index 19bbc5b5f..97ee4bf2f 100644
--- a/apps/api/src/utils/authenticate-api-request.ts
+++ b/apps/api/src/utils/authenticate-api-request.ts
@@ -48,7 +48,7 @@ function parseBearerToken(authHeader: string | undefined): {
}
return {
- token: match[1],
+ token: match[1] ?? null,
malformed: false,
};
}
diff --git a/apps/api/src/utils/migrate-organizations.ts b/apps/api/src/utils/migrate-organizations.ts
index b500c6180..0b140ed76 100644
--- a/apps/api/src/utils/migrate-organizations.ts
+++ b/apps/api/src/utils/migrate-organizations.ts
@@ -32,6 +32,7 @@ async function migrateOrganizations() {
teamId: data?.id || "",
userId: member.userId,
},
+ headers: new Headers(),
});
}
}
diff --git a/apps/api/src/utils/workspace-access-middleware.ts b/apps/api/src/utils/workspace-access-middleware.ts
index 714c90bab..89ed0eeeb 100644
--- a/apps/api/src/utils/workspace-access-middleware.ts
+++ b/apps/api/src/utils/workspace-access-middleware.ts
@@ -58,14 +58,14 @@ export function workspaceAccessMiddleware(
workspaceId = c.req.query(source.key) || null;
} else if (source.type === "body") {
const body = await readJsonObjectBody(c);
- workspaceId =
- typeof body[source.key] === "string" ? body[source.key] : null;
+ const bodyValue = body[source.key];
+ workspaceId = typeof bodyValue === "string" ? bodyValue : null;
} else if (source.type === "param") {
workspaceId = c.req.param(source.key) || null;
} else if (source.type === "lookup") {
const body = await readJsonObjectBody(c);
- const idFromBody =
- typeof body[source.idKey] === "string" ? body[source.idKey] : null;
+ const bodyId = body[source.idKey];
+ const idFromBody = typeof bodyId === "string" ? bodyId : null;
// Only accept the id from the same place the handler will read it
// (path param or JSON body). Accepting it from the query string let a
// caller authorize against one resource (`?taskId=<mine>`) while the
@@ -101,7 +101,7 @@ export function workspaceAccessMiddleware(
message: "All tasks must belong to the same workspace",
});
}
- workspaceId = workspaceIds[0];
+ workspaceId = workspaceIds[0] ?? null;
}
}
}
diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json
index a7e0e664d..4216a971b 100644
--- a/apps/api/tsconfig.json
+++ b/apps/api/tsconfig.json
@@ -4,8 +4,8 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
- "module": "CommonJS",
- "moduleResolution": "Node",
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
"target": "ES2022",
"lib": [
"ES2022",
diff --git a/apps/web/src/components/notification/notification-dropdown.test.ts b/apps/web/src/components/notification/notification-dropdown.test.ts
index 09e77af35..73759cdf9 100644
--- a/apps/web/src/components/notification/notification-dropdown.test.ts
+++ b/apps/web/src/components/notification/notification-dropdown.test.ts
@@ -5,10 +5,7 @@ import {
getNotificationTitle,
} from "./notification-dropdown";
-const t = (
- key: string,
- options?: Record<string, number | string | undefined>,
-) => {
+const t = (key: string, options?: Record<string, unknown>) => {
if (key === "notifications:reminderLeadTime.days") {
return `${options?.count} days`;
}
diff --git a/apps/web/src/components/ui/input.tsx b/apps/web/src/components/ui/input.tsx
index ea54255be..98804c1f9 100644
--- a/apps/web/src/components/ui/input.tsx
+++ b/apps/web/src/components/ui/input.tsx
@@ -1,6 +1,7 @@
"use client";
import { Input as InputPrimitive } from "@base-ui/react/input";
+import type { useRender } from "@base-ui/react/use-render";
import type * as React from "react";
import { cn } from "@/lib/cn";
@@ -49,7 +50,7 @@ function Input({
className={inputClassName}
data-slot="input"
size={typeof size === "number" ? size : undefined}
- {...props}
+ {...(props as useRender.ElementProps<"input">)}
/>
) : (
<InputPrimitive
diff --git a/apps/web/src/fetchers/project/get-project.ts b/apps/web/src/fetchers/project/get-project.ts
index eba029dd0..815276812 100644
--- a/apps/web/src/fetchers/project/get-project.ts
+++ b/apps/web/src/fetchers/project/get-project.ts
@@ -3,13 +3,13 @@ import type { InferRequestType } from "hono/client";
export type GetProjectRequest = InferRequestType<
(typeof client)["project"][":id"]["$get"]
->["param"] &
- InferRequestType<(typeof client)["project"][":id"]["$get"]>["query"];
+>["param"] & {
+ workspaceId: string;
+};
-async function getProject({ id, workspaceId }: GetProjectRequest) {
+async function getProject({ id }: GetProjectRequest) {
const response = await client.project[":id"].$get({
param: { id },
- query: { workspaceId },
});
if (!response.ok) {
diff --git a/apps/web/src/fetchers/task/create-task.ts b/apps/web/src/fetchers/task/create-task.ts
index 061db8876..0729db2c0 100644
--- a/apps/web/src/fetchers/task/create-task.ts
+++ b/apps/web/src/fetchers/task/create-task.ts
@@ -14,7 +14,7 @@ async function createTask(
status: string,
startDate: Date | undefined,
dueDate: Date | undefined,
- priority: string,
+ priority: CreateTaskRequest["priority"],
) {
if (!projectId) {
throw new Error("No project selected for task creation");
diff --git a/apps/web/src/fetchers/task/update-task-priority.ts b/apps/web/src/fetchers/task/update-task-priority.ts
index 7610be060..f54285955 100644
--- a/apps/web/src/fetchers/task/update-task-priority.ts
+++ b/apps/web/src/fetchers/task/update-task-priority.ts
@@ -1,11 +1,16 @@
import { client } from "@kaneo/libs";
+import type { InferRequestType } from "hono/client";
import type Task from "@/types/task";
+type UpdateTaskPriorityValue = InferRequestType<
+ (typeof client)["task"]["priority"][":id"]["$put"]
+>["json"]["priority"];
+
async function updateTaskPriority(taskId: string, task: Task) {
const response = await client.task.priority[":id"].$put({
param: { id: taskId },
json: {
- priority: task.priority || "",
+ priority: (task.priority || "") as UpdateTaskPriorityValue,
},
});
diff --git a/apps/web/src/fetchers/task/update-task.ts b/apps/web/src/fetchers/task/update-task.ts
index 566b30819..ce70f1fb0 100644
--- a/apps/web/src/fetchers/task/update-task.ts
+++ b/apps/web/src/fetchers/task/update-task.ts
@@ -1,6 +1,11 @@
import { client } from "@kaneo/libs";
+import type { InferRequestType } from "hono/client";
import type Task from "@/types/task";
+type UpdateTaskPriority = InferRequestType<
+ (typeof client)["task"][":id"]["$put"]
+>["json"]["priority"];
+
async function updateTask(taskId: string, task: Task) {
const response = await client.task[":id"].$put({
param: { id: taskId },
@@ -9,7 +14,7 @@ async function updateTask(taskId: string, task: Task) {
title: task.title,
description: task.description || "",
status: task.status,
- priority: task.priority || "",
+ priority: (task.priority || "") as UpdateTaskPriority,
startDate: task.startDate?.toString(),
dueDate: task.dueDate?.toString(),
position: task.position ?? 0,
diff --git a/apps/web/src/hooks/queries/workspace/use-workspace-roles.ts b/apps/web/src/hooks/queries/workspace/use-workspace-roles.ts
index 6429c9f07..059b90f4f 100644
--- a/apps/web/src/hooks/queries/workspace/use-workspace-roles.ts
+++ b/apps/web/src/hooks/queries/workspace/use-workspace-roles.ts
@@ -38,14 +38,7 @@ function useWorkspaceRoles(workspaceId: string | undefined) {
query: { organizationId: workspaceId },
});
if (result.error) throw new Error(result.error.message);
- const roles = (result.data ?? []) as Array<{
- id: string;
- organizationId: string;
- role: string;
- permission: string;
- createdAt: Date | string;
- updatedAt?: Date | string | null;
- }>;
+ const roles = result.data ?? [];
return roles.map((r) => ({
id: r.id,
diff --git a/apps/web/src/lib/auth-client.ts b/apps/web/src/lib/auth-client.ts
index 4416f3f19..e090dee11 100644
--- a/apps/web/src/lib/auth-client.ts
+++ b/apps/web/src/lib/auth-client.ts
@@ -10,6 +10,7 @@ import {
magicLinkClient,
organizationClient,
} from "better-auth/client/plugins";
+import type { AccessControl } from "better-auth/plugins/access";
import { createAuthClient } from "better-auth/react";
import { ac, admin, member, owner, viewer } from "./permissions";
@@ -32,7 +33,10 @@ export const authClient = createAuthClient({
magicLinkClient(),
emailOTPClient(),
organizationClient({
- ac,
+ // Same widening as the server plugin in `apps/api/src/auth.ts`: our
+ // narrow `statement` shape makes `ac`'s inferred `newRole` generic
+ // incompatible with better-auth's looser `AccessControl` type.
+ ac: ac as AccessControl,
roles: {
viewer,
member,
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
index cfac2f8fd..d99040e07 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
@@ -60,9 +60,9 @@ const BUILT_IN_RESOURCES = new Set([
"invitation",
"ac",
]);
-const CUSTOM_RESOURCES = (Object.keys(statement) as string[]).filter(
- (key) => !BUILT_IN_RESOURCES.has(key),
-);
+const CUSTOM_RESOURCES = (
+ Object.keys(statement) as (keyof typeof statement)[]
+).filter((key) => !BUILT_IN_RESOURCES.has(key));
const RESOURCE_LABELS: Record<string, string> = {
project: "Projects",
@@ -309,7 +309,7 @@ function RouteComponent() {
</Empty>
) : (
<Accordion
- openMultiple
+ multiple
value={openCustom}
onValueChange={(value) =>
setOpenCustom(Array.isArray(value) ? value : [value])
diff --git a/apps/web/src/routes/auth/check-email.tsx b/apps/web/src/routes/auth/check-email.tsx
index 53ec94730..75c220e3f 100644
--- a/apps/web/src/routes/auth/check-email.tsx
+++ b/apps/web/src/routes/auth/check-email.tsx
@@ -37,10 +37,10 @@ function CheckEmail() {
<div className="space-y-3">
<Button
variant="ghost"
- asChild
+ render={<Link to="/auth/sign-in" />}
className="w-full h-8 text-xs text-muted-foreground hover:text-foreground"
>
- <Link to="/auth/sign-in">{t("auth:checkEmail.backToLogin")}</Link>
+ {t("auth:checkEmail.backToLogin")}
</Button>
</div>
</div>
diff --git a/apps/web/src/routes/invitation/accept.$inviteId.tsx b/apps/web/src/routes/invitation/accept.$inviteId.tsx
index 9f5e21783..2d424604f 100644
--- a/apps/web/src/routes/invitation/accept.$inviteId.tsx
+++ b/apps/web/src/routes/invitation/accept.$inviteId.tsx
@@ -132,8 +132,12 @@ function AcceptInvitation() {
{t("auth:invitation.errorLoadDescription")}
</AlertDescription>
</Alert>
- <Button asChild variant="outline" className="w-full">
- <Link to="/auth/sign-in">{t("auth:invitation.goToSignIn")}</Link>
+ <Button
+ render={<Link to="/auth/sign-in" />}
+ variant="outline"
+ className="w-full"
+ >
+ {t("auth:invitation.goToSignIn")}
</Button>
</div>
</AuthLayout>
@@ -173,8 +177,12 @@ function AcceptInvitation() {
)}
</div>
- <Button asChild variant="outline" className="w-full">
- <Link to="/auth/sign-in">{t("auth:invitation.goToSignIn")}</Link>
+ <Button
+ render={<Link to="/auth/sign-in" />}
+ variant="outline"
+ className="w-full"
+ >
+ {t("auth:invitation.goToSignIn")}
</Button>
</div>
</AuthLayout>
@@ -243,10 +251,12 @@ function AcceptInvitation() {
)}
</Button>
- <Button asChild variant="outline" className="w-full">
- <Link to="/dashboard">
- {t("auth:invitation.goToDashboard")}
- </Link>
+ <Button
+ render={<Link to="/dashboard" />}
+ variant="outline"
+ className="w-full"
+ >
+ {t("auth:invitation.goToDashboard")}
</Button>
</div>
diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json
index e01b6c83e..3304430da 100644
--- a/apps/web/tsconfig.app.json
+++ b/apps/web/tsconfig.app.json
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
- "target": "ES2020",
+ "target": "ES2022",
"useDefineForClassFields": true,
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,