typescript fixes, replayer close error, show page toggle fix.
This commit is contained in:
1 parent
10dced1049
commit
f3ce0e64ca
15 files changed
+67
-28
No files matched your search
@@ -32,7 +32,7 @@ export function CopyButton({ value, label = 'Copy' }: { value: string; label?: s
|
||||
};
|
||||
|
||||
return (
|
||||
<Button variant="quiet" onPress={handleCopy} title={label} aria-label={label}>
|
||||
<Button variant="quiet" onPress={handleCopy} aria-label={label}>
|
||||
<Icon size="sm">{copied ? <Check /> : <Copy />}</Icon>
|
||||
</Button>
|
||||
);
|
||||
|
||||
@@ -3,9 +3,9 @@ import type { ErrorInfo, ReactNode } from 'react';
|
||||
import { ErrorBoundary as Boundary } from 'react-error-boundary';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
const logError = (error: Error, info: ErrorInfo) => {
|
||||
const logError = (error: unknown, info: ErrorInfo) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error, info.componentStack);
|
||||
console.error(error instanceof Error ? error : new Error(String(error)), info.componentStack);
|
||||
};
|
||||
|
||||
export function ErrorBoundary({ children }: { children: ReactNode }) {
|
||||
|
||||
@@ -23,15 +23,14 @@ export function FilterLink({ type, value, label, externalUrl, icon }: FilterLink
|
||||
<Row
|
||||
alignItems="center"
|
||||
gap
|
||||
fontWeight={active && selected ? 'bold' : undefined}
|
||||
color={active && !selected ? 'muted' : undefined}
|
||||
onMouseOver={() => setShowLink(true)}
|
||||
onMouseOut={() => setShowLink(false)}
|
||||
>
|
||||
{icon}
|
||||
{!value && `(${label || t(labels.unknown)})`}
|
||||
{!value && <Text weight={active && selected ? 'bold' : undefined}>({label || t(labels.unknown)})</Text>}
|
||||
{value && (
|
||||
<Text title={label || value} truncate>
|
||||
<Text title={label || value} truncate weight={active && selected ? 'bold' : undefined}>
|
||||
<Link href={updateParams({ [type]: `eq.${value}` })} replace>
|
||||
{label || value}
|
||||
</Link>
|
||||
|
||||
Reference in new issue
Block a user