fix(frontend): apply feedback's

This commit is contained in:
yassinedorbozgithub 2024-10-02 04:17:54 +01:00
parent 3ab9e966a2
commit 889836e398
4 changed files with 17 additions and 6 deletions

View File

@ -8,7 +8,6 @@
import { Box, FormHelperText, FormLabel } from "@mui/material";
import { forwardRef } from "react";
import { useTranslation } from "react-i18next";
import { useGet } from "@/hooks/crud/useGet";
import { useHasPermission } from "@/hooks/useHasPermission";
@ -47,7 +46,6 @@ const AttachmentInput = forwardRef<HTMLDivElement, AttachmentThumbnailProps>(
ref,
) => {
const hasPermission = useHasPermission();
const { t } = useTranslation();
const handleChange = (attachment: IAttachment | null) => {
onChange && onChange(attachment?.id || null, attachment?.type || null);
};
@ -84,9 +82,7 @@ const AttachmentInput = forwardRef<HTMLDivElement, AttachmentThumbnailProps>(
enableMediaLibrary={enableMediaLibrary}
onChange={handleChange}
/>
) : (
t("message.no_attachment")
)}
) : null}
{helperText ? (
<FormHelperText error={error}>{helperText}</FormHelperText>
) : null}

View File

@ -1,5 +1,13 @@
import { TOptionsBase } from "i18next";
/*
* Copyright © 2024 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/
import { translations } from ".";
import { TFilterNestedKeysOfType } from "@/types/common/object.types";

View File

@ -1,3 +1,11 @@
/*
* Copyright © 2024 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/
import en from "@/i18n/en/translation.json";
import fr from "@/i18n/fr/translation.json";

View File

@ -4,7 +4,6 @@
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
* 3. SaaS Restriction: This software, or any derivative of it, may not be used to offer a competing product or service (SaaS) without prior written consent from Hexastack. Offering the software as a service or using it in a commercial cloud environment without express permission is strictly prohibited.
*/
export type TFilterNestedKeysOfType<T, U = string> = T extends object