Fix bot review

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-30 19:13:10 +04:00
parent e13ff134ed
commit d9c07ecdef
20 changed files with 54 additions and 31 deletions

View File

@@ -211,7 +211,7 @@ export function OrganizationForm(props: {
<Label>{__("Organization logo")}</Label>
<div className="flex w-max items-center gap-4">
<Avatar
className="bg-transparent"
className={logoPreview || organization.logoUrl ? "bg-transparent" : undefined}
src={logoPreview || organization.logoUrl}
name={organization.name}
size="xl"

View File

@@ -7,6 +7,7 @@ import {
IconTrashCan,
Label,
Spinner,
useToast,
} from "@probo/ui";
import { type ChangeEventHandler, useState } from "react";
import { type PreloadedQuery, usePreloadedQuery } from "react-relay";
@@ -46,7 +47,9 @@ const updateTrustCenterBrandMutation = graphql`
export function CompliancePageBrandPage(props: { queryRef: PreloadedQuery<CompliancePageBrandPageQuery> }) {
const { queryRef } = props;
const { __ } = useTranslate();
const { toast } = useToast();
const { organization } = usePreloadedQuery<CompliancePageBrandPageQuery>(compliancePageBrandPageQuery, queryRef);
if (organization.__typename !== "Organization") {
@@ -81,6 +84,15 @@ export function CompliancePageBrandPage(props: { queryRef: PreloadedQuery<Compli
const file = e.target.files?.[0];
if (!file) return;
if (file.size > 5 * 1024 * 1024) {
toast({
title: __("File size too large"),
description: __("The file size is too large. Please upload a file smaller than 5MB."),
variant: "error",
});
return;
}
processLogoFile(file, setLogoPreview);
void updateBrand({
@@ -103,6 +115,15 @@ export function CompliancePageBrandPage(props: { queryRef: PreloadedQuery<Compli
const file = e.target.files?.[0];
if (!file) return;
if (file.size > 5 * 1024 * 1024) {
toast({
title: __("File size too large"),
description: __("The file size is too large. Please upload a file smaller than 5MB."),
variant: "error",
});
return;
}
processLogoFile(file, setDarkLogoPreview);
void updateBrand({

View File

@@ -100,7 +100,7 @@ export function DeleteCompliancePageDomainDialog(props: DeleteCompliancePageDoma
variant="danger"
icon={IconTrashCan}
onClick={() => void handleDeleteDomain()}
disabled={isDeleting}
disabled={isDeleting || inputValue !== domain}
>
{isDeleting ? __("Deleting...") : __("Delete Domain")}
</Button>

View File

@@ -39,10 +39,10 @@ export function AuthLayout(props: { queryRef: PreloadedQuery<AuthLayoutQuery> })
<img
alt=""
src={logoFileUrl}
className="size-110 rounded-2xl"
className="size-[440px] rounded-2xl"
/>
)
: <Logo withPicto className="w-110" />}
: <Logo withPicto className="w-[440px]" />}
</div>
</div>
</div>