diff --git a/lib/components/ViewPublicationPage/ContactForm/Inputs/Inputs.tsx b/lib/components/ViewPublicationPage/ContactForm/Inputs/Inputs.tsx index b4d2f63..186d2e6 100644 --- a/lib/components/ViewPublicationPage/ContactForm/Inputs/Inputs.tsx +++ b/lib/components/ViewPublicationPage/ContactForm/Inputs/Inputs.tsx @@ -29,8 +29,9 @@ type InputsProps = { }; }; -const iscrutch = "/cc006b40-ccbd-4600-a1d3-f902f85aa0a0"; const pathOnly = window.location.pathname; +const iscrutch = + pathOnly === "/cc006b40-ccbd-4600-a1d3-f902f85aa0a0" || pathOnly === "/28525cd7-9ddf-4c4a-a55b-e3d2f7d47583"; export const Inputs = ({ name, @@ -58,11 +59,7 @@ export const Inputs = ({ setName(target.value)} id={name} - title={ - pathOnly === iscrutch - ? "Введите имя и фамилию" - : FC["name"].innerText || `${t("Enter")} ${t("Name").toLowerCase()}` - } + title={iscrutch ? "Введите имя и фамилию" : FC["name"].innerText || `${t("Enter")} ${t("Name").toLowerCase()}`} desc={FC["name"].text || t("Name")} Icon={NameIcon} /> diff --git a/lib/components/ViewPublicationPage/tools/Select.tsx b/lib/components/ViewPublicationPage/tools/Select.tsx index 770056d..587213c 100644 --- a/lib/components/ViewPublicationPage/tools/Select.tsx +++ b/lib/components/ViewPublicationPage/tools/Select.tsx @@ -56,7 +56,11 @@ export const Select = ({ - value ? items[Number(value)] : {placeholder} + value ? ( + {items[Number(value)]} + ) : ( + {placeholder} + ) } id="display-select" variant="outlined" @@ -123,7 +127,7 @@ export const Select = ({ padding: "10px", borderRadius: "5px", color: colorPlaceholder, - whiteSpace: "normal", + whiteSpace: "pre-wrap", wordBreak: "break-word", }} > diff --git a/lib/utils/themes/generic.ts b/lib/utils/themes/generic.ts index 79cf032..f7011e4 100644 --- a/lib/utils/themes/generic.ts +++ b/lib/utils/themes/generic.ts @@ -20,7 +20,16 @@ const theme = createTheme({ }, components: { MuiCssBaseline: { - styleOverrides: fontFaces, + styleOverrides: { + // Если fontFaces это CSSObject + ...(typeof fontFaces === "string" ? {} : fontFaces), + // Добавляем стиль для Typography + ".MuiTypography-root": { + whiteSpace: "pre-wrap !important", + }, + // Если fontFaces это строка, добавляем её как @font-face + ...(typeof fontFaces === "string" ? { "@font-face": fontFaces } : {}), + }, }, MuiScopedCssBaseline: { styleOverrides: { @@ -28,6 +37,11 @@ const theme = createTheme({ }, }, MuiTypography: { + styleOverrides: { + root: { + whiteSpace: "pre-wrap", + }, + }, defaultProps: { variantMapping: { p1: "p",