diff --git a/rsconcept/frontend/src/App.tsx b/rsconcept/frontend/src/App.tsx index 69dc1016..0d604983 100644 --- a/rsconcept/frontend/src/App.tsx +++ b/rsconcept/frontend/src/App.tsx @@ -20,32 +20,33 @@ import { globalIDs } from './utils/constants'; function Root() { const { noNavigation, noFooter, viewportHeight, mainHeight, showScroll } = useConceptTheme(); return ( - -
+ +
+ + + + + +
+
+ +
- - - -
-
- -
- {!noNavigation && !noFooter &&
} -
+ {(!noNavigation && !noFooter) ?
: null}
- - ); +
+
); } const router = createBrowserRouter([ diff --git a/rsconcept/frontend/src/components/BackendError.tsx b/rsconcept/frontend/src/components/BackendError.tsx index cbcb2af7..894df4b1 100644 --- a/rsconcept/frontend/src/components/BackendError.tsx +++ b/rsconcept/frontend/src/components/BackendError.tsx @@ -50,8 +50,8 @@ function DescribeError(error: ErrorInfo) {

{error.message}

{error.response.data && (<>

Описание

- { isHtml &&
} - { !isHtml && } + {isHtml ?
: null} + {!isHtml ? : null} )}
); diff --git a/rsconcept/frontend/src/components/Common/Button.tsx b/rsconcept/frontend/src/components/Common/Button.tsx index e5a95a2c..94c3ae70 100644 --- a/rsconcept/frontend/src/components/Common/Button.tsx +++ b/rsconcept/frontend/src/components/Common/Button.tsx @@ -28,8 +28,8 @@ function Button({ className={`inline-flex items-center gap-2 align-middle justify-center select-none ${padding} ${colors} ${outlineClass} ${borderClass} ${dimensions} ${cursor}`} {...props} > - {icon && icon} - {text && {text}} + {icon ? icon : null} + {text ? {text} : null} ); } diff --git a/rsconcept/frontend/src/components/Common/Checkbox.tsx b/rsconcept/frontend/src/components/Common/Checkbox.tsx index ba20f94f..4190b763 100644 --- a/rsconcept/frontend/src/components/Common/Checkbox.tsx +++ b/rsconcept/frontend/src/components/Common/Checkbox.tsx @@ -5,7 +5,6 @@ import Label from './Label'; export interface CheckboxProps extends Omit, 'className' | 'children' | 'title' | 'value' | 'onClick' > { - id?: string label?: string disabled?: boolean dimensions?: string @@ -43,8 +42,7 @@ function Checkbox({ } return ( - ); } diff --git a/rsconcept/frontend/src/components/Common/ConceptSearch.tsx b/rsconcept/frontend/src/components/Common/ConceptSearch.tsx index f023da6f..a12f3435 100644 --- a/rsconcept/frontend/src/components/Common/ConceptSearch.tsx +++ b/rsconcept/frontend/src/components/Common/ConceptSearch.tsx @@ -20,7 +20,7 @@ function ConceptSearch({ value, onChange, dense }: ConceptSearchProps) { noOutline noBorder={dense} value={value} - onChange={event => onChange && onChange(event.target.value)} + onChange={event => (onChange ? onChange(event.target.value) : undefined)} />
); } diff --git a/rsconcept/frontend/src/components/Common/DropdownButton.tsx b/rsconcept/frontend/src/components/Common/DropdownButton.tsx index fbb54e65..60999f63 100644 --- a/rsconcept/frontend/src/components/Common/DropdownButton.tsx +++ b/rsconcept/frontend/src/components/Common/DropdownButton.tsx @@ -6,10 +6,10 @@ interface DropdownButtonProps { } function DropdownButton({ tooltip, onClick, disabled, children }: DropdownButtonProps) { - const behavior = (onClick ? 'cursor-pointer disabled:cursor-not-allowed clr-hover' : 'cursor-default'); + const behavior = onClick ? 'cursor-pointer disabled:cursor-not-allowed clr-hover' : 'cursor-default'; const text = disabled ? 'text-controls' : ''; return ( - ); } diff --git a/rsconcept/frontend/src/components/Common/SubmitButton.tsx b/rsconcept/frontend/src/components/Common/SubmitButton.tsx index 52bd23d8..5b8f52c3 100644 --- a/rsconcept/frontend/src/components/Common/SubmitButton.tsx +++ b/rsconcept/frontend/src/components/Common/SubmitButton.tsx @@ -17,8 +17,8 @@ function SubmitButton({ className={`px-4 py-2 inline-flex items-center gap-2 align-middle justify-center font-semibold select-none disabled:cursor-not-allowed border rounded clr-btn-primary ${dimensions} ${loading ? ' cursor-progress' : ''}`} disabled={disabled ?? loading} > - {icon && {icon}} - {text && {text}} + {icon ? {icon} : null} + {text ? {text} : null} ); } diff --git a/rsconcept/frontend/src/components/Common/SwitchButton.tsx b/rsconcept/frontend/src/components/Common/SwitchButton.tsx index 1489c189..703bb677 100644 --- a/rsconcept/frontend/src/components/Common/SwitchButton.tsx +++ b/rsconcept/frontend/src/components/Common/SwitchButton.tsx @@ -22,7 +22,7 @@ function SwitchButton({ className={`px-2 py-1 border font-semibold small-caps rounded-none cursor-pointer clr-btn-clear clr-hover ${dimensions} ${isSelected ? 'clr-selected': ''}`} {...props} > - {icon && icon} + {icon ? icon : null} {label} ); } diff --git a/rsconcept/frontend/src/components/Common/TextInput.tsx b/rsconcept/frontend/src/components/Common/TextInput.tsx index 956588e5..0210d663 100644 --- a/rsconcept/frontend/src/components/Common/TextInput.tsx +++ b/rsconcept/frontend/src/components/Common/TextInput.tsx @@ -23,15 +23,14 @@ function TextInput({ const outlineClass = noOutline ? '' : 'clr-outline'; return (
- {label && + {label ?