{showButtons && (
diff --git a/packages/client/src/components/MultiSearch.tsx b/packages/client/src/components/MultiSearch.tsx
index a6b6c1b79c..ee7aea5e60 100644
--- a/packages/client/src/components/MultiSearch.tsx
+++ b/packages/client/src/components/MultiSearch.tsx
@@ -46,7 +46,7 @@ export default function MultiSearch({
type="text"
value={value ?? ''}
onChange={onChangeHandler}
- placeholder={placeholder ?? localize('com_ui_select_search_model')}
+ placeholder={String(placeholder ?? localize('com_ui_select_search_model'))}
aria-label="Search Model"
className="flex-1 rounded-md border-none bg-transparent px-2.5 py-2 text-sm placeholder-text-secondary focus:outline-none focus:ring-1 focus:ring-ring-primary"
/>
diff --git a/packages/client/src/components/MultiSelect.tsx b/packages/client/src/components/MultiSelect.tsx
index 55a0b6a553..d7798e810d 100644
--- a/packages/client/src/components/MultiSelect.tsx
+++ b/packages/client/src/components/MultiSelect.tsx
@@ -87,7 +87,7 @@ export default function MultiSelect({
)}
onChange={(e) => e.stopPropagation()}
>
- {selectIcon && selectIcon}
+ {selectIcon && {selectIcon as React.JSX.Element}}
{renderSelectedValues(selectedValues, placeholder)}
@@ -130,8 +130,12 @@ export default function MultiSelect({
)}
>
{renderItemContent
- ? renderItemContent(value, defaultContent, isCurrentItemSelected)
- : defaultContent}
+ ? (renderItemContent(
+ value,
+ defaultContent,
+ isCurrentItemSelected,
+ ) as React.JSX.Element)
+ : (defaultContent as React.JSX.Element)}
);
})}
diff --git a/packages/client/src/components/OGDialogTemplate.tsx b/packages/client/src/components/OGDialogTemplate.tsx
index ecf4b9c951..fe2e919a4e 100644
--- a/packages/client/src/components/OGDialogTemplate.tsx
+++ b/packages/client/src/components/OGDialogTemplate.tsx
@@ -97,7 +97,11 @@ const OGDialogTemplate = forwardRef((props: DialogTemplateProps, ref: Ref
- {isLoading === true ? : selectText}
+ {isLoading === true ? (
+
+ ) : (
+ (selectText as React.JSX.Element)
+ )}
) : null}
diff --git a/packages/client/src/components/PixelCard.tsx b/packages/client/src/components/PixelCard.tsx
index 141a3ee55c..c1f3d8971a 100644
--- a/packages/client/src/components/PixelCard.tsx
+++ b/packages/client/src/components/PixelCard.tsx
@@ -173,7 +173,7 @@ export default function PixelCard({
const containerRef = useRef
(null);
const canvasRef = useRef(null);
const pixelsRef = useRef([]);
- const animationRef = useRef();
+ const animationRef = useRef(undefined);
const timePrevRef = useRef(performance.now());
const progressRef = useRef(progress);
const reducedMotion = useRef(
@@ -221,9 +221,11 @@ export default function PixelCard({
let idle = true;
for (const p of pixelsRef.current) {
if (method === 'appearWithProgress') {
- progressRef.current !== undefined
- ? p.appearWithProgress(progressRef.current)
- : (p.isIdle = true);
+ if (progressRef.current !== undefined) {
+ p.appearWithProgress(progressRef.current);
+ } else {
+ p.isIdle = true;
+ }
} else {
// @ts-ignore dynamic dispatch
p[method]();
@@ -312,7 +314,9 @@ export default function PixelCard({
useEffect(() => {
initPixels();
const obs = new ResizeObserver(initPixels);
- containerRef.current && obs.observe(containerRef.current);
+ if (containerRef.current) {
+ obs.observe(containerRef.current);
+ }
return () => {
obs.disconnect();
cancelAnimationFrame(animationRef.current!);
diff --git a/packages/client/src/components/Select.tsx b/packages/client/src/components/Select.tsx
index 671bae4438..3301e3577c 100644
--- a/packages/client/src/components/Select.tsx
+++ b/packages/client/src/components/Select.tsx
@@ -4,12 +4,15 @@ import { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix
import { cn } from '~/utils';
+// @ts-ignore - Radix UI type conflicts with React types
const Select = SelectPrimitive.Root;
+// @ts-ignore - Radix UI type conflicts with React types
const SelectGroup = SelectPrimitive.Group;
const SelectValue = SelectPrimitive.Value;
+// @ts-ignore - Radix UI type conflicts with React types
const SelectTrigger = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
diff --git a/packages/client/src/components/SelectDropDown.tsx b/packages/client/src/components/SelectDropDown.tsx
index 892e9fa542..3d68b934a0 100644
--- a/packages/client/src/components/SelectDropDown.tsx
+++ b/packages/client/src/components/SelectDropDown.tsx
@@ -85,7 +85,7 @@ function SelectDropDown({
if (emptyTitle) {
title = '';
} else if (!(title ?? '')) {
- title = localize('com_ui_model');
+ title = String(localize('com_ui_model'));
}
const values = availableValues ?? [];
@@ -186,7 +186,7 @@ function SelectDropDown({
- {renderOption()}
+ {renderOption() as React.JSX.Element}
)}
- {searchRender}
+ {searchRender as React.JSX.Element}
{options.map((option: string | Option, i: number) => {
if (!option) {
return null;