Compare commits

..

4 Commits

Author SHA1 Message Date
Henry
1b4b0280e3 chore: add translations 2025-07-09 21:56:05 +01:00
Henry
cc4a09914c feat: add loading state to update board slug button 2025-07-09 21:24:53 +01:00
Henry
09e2df708a feat: add edit workspace url button 2025-07-09 14:22:57 +01:00
Henry
a81594124e feat: add update board slug button 2025-07-09 13:37:10 +01:00
3 changed files with 3 additions and 30 deletions

View File

@@ -1,18 +0,0 @@
import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import { env } from "next-runtime-env";
export function middleware(request: NextRequest) {
if (request.nextUrl.pathname === "/") {
if (env("NEXT_PUBLIC_KAN_ENV") !== "cloud") {
const loginUrl = new URL("/login", request.url);
return NextResponse.redirect(loginUrl);
}
}
return NextResponse.next();
}
export const config = {
matcher: ["/"],
};

View File

@@ -3,8 +3,6 @@ import { t } from "@lingui/core/macro";
import { env } from "next-runtime-env";
import { useState } from "react";
import { generateUID } from "@kan/shared/utils";
import { usePopup } from "~/providers/popup";
import { api } from "~/utils/api";
import { getAvatarUrl } from "~/utils/helpers";
@@ -60,7 +58,7 @@ export default function Avatar({
}
const fileExt = file.name.split(".").pop();
const fileName = `${userId}/avatar-${generateUID()}.${fileExt}`;
const fileName = `${userId}/avatar.${fileExt}`;
setUploading(true);

View File

@@ -83,18 +83,11 @@ export const memberRouter = createTRPCRouter({
callbackURL: `/boards?type=invite&memberPublicId=${invite.publicId}`,
});
if (error) {
console.error("Failed to send magic link invitation:", {
email: input.email,
callbackURL: `/boards?type=invite&memberPublicId=${invite.publicId}`,
error,
});
if (error)
throw new TRPCError({
message: `Failed to send magic link invitation to user with email ${input.email}.`,
message: `Failed to send magic link to user with email ${input.email}`,
code: "INTERNAL_SERVER_ERROR",
});
}
return invite;
}),