Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit b6797fc

Browse files
committed
fix: typings
1 parent 11062f2 commit b6797fc

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

src/components/dapp/Connected.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function Connected({ hideSpyMode = false, children, chain: onlyOn
2424
</Button>
2525
</Modal>
2626
);
27-
if (chain && chainId !== onlyOnChain)
27+
if (chain && onlyOnChain && chainId !== onlyOnChain)
2828
return (
2929
<Button look="hype" size="md" {...props} onClick={() => switchChain(onlyOnChain)}>
3030
Switch to {chain.name}

src/components/extenders/PaginatedSelect.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export default function PaginatedSelect({
181181
}, []);
182182

183183
useEffect(() => {
184+
if (!debouncedSearch) return;
184185
onSearchProps?.(debouncedSearch);
185186
}, [debouncedSearch, onSearchProps]);
186187

src/components/extenders/Select.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,10 @@ export default function Select<
335335
key="select"
336336
className={mergeClass(
337337
check(),
338-
!((typeof value === "object" && value?.includes(_value as T)) || value === _value) &&
339-
"opacity-0",
338+
!(
339+
(typeof value === "object" && (value as T[])?.includes(_value as T)) ||
340+
value === _value
341+
) && "opacity-0",
340342
)}
341343
size="sm"
342344
remix="RiCheckFill"

src/components/primitives/Hash.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default function Hash({ value, format, copy, size, children: hash, classN
3434
{...props}
3535
className={mergeClass("items-center gap-sm font-text", copy && "select-none inline-flex", className)}>
3636
{formatted}
37-
{copy && <Copy value={hash} />}
37+
{copy && <Copy value={hash as string} />}
3838
</Text>
3939
);
4040
}

src/components/primitives/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type InputExtension = (typeof extensions)[number];
5555

5656
export type InputProps<T = string> = Component<
5757
Styled<typeof inputStyles> & { [Extension in InputExtension]?: ReactNode } & {
58-
state?: GetSet<T | undefined>;
58+
state?: GetSet<T>;
5959
inputClassName?: string;
6060
error?: ReactNode;
6161
},
@@ -113,7 +113,7 @@ function Input({ look, size, state, inputClassName, className, ...props }: Input
113113
);
114114
}
115115

116-
Input.BigInt = function InputBigInt({ state, base, ...props }: InputProps<bigint> & { base: number }) {
116+
Input.BigInt = function InputBigInt({ state, base, ...props }: InputProps<bigint | undefined> & { base: number }) {
117117
const [internal, setInternal] = useState<bigint>();
118118
const [displayed, setDisplayed] = useState<string>();
119119
const [_getter, setter] = state ?? [];

src/context/Dapp.context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function useDAppContext() {
2222

2323
export type DAppProviderProps = {
2424
config: ResolvedRegister["config"];
25-
themes?: ThemeProviderProps["themes"];
25+
themes: ThemeProviderProps["themes"];
2626
sizing: SizingConfig;
2727
modes: Mode[];
2828
chains: (Chain & { explorers: Explorer[] })[];

0 commit comments

Comments
 (0)