Skip to content

Commit 0af2a16

Browse files
committed
web: Fixes
1 parent a643d5f commit 0af2a16

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

web/renderer/components/util/NotDoltWrapper/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React, { ReactElement } from "react";
44
import NotDoltMsg from "./NotDoltMsg";
55

66
type Props = {
7-
children: ReactElement;
7+
children: ReactElement<{ doltDisabled?: boolean }>;
88
showNotDoltMsg?: boolean;
99
feature?: string;
1010
className?: string;
@@ -32,7 +32,7 @@ export default function NotDoltWrapper(props: Props) {
3232
);
3333
}
3434
if (res.disableDoltFeature) {
35-
return React.cloneElement(props.children, { doltDisabled: true } as any);
35+
return React.cloneElement(props.children, { doltDisabled: true });
3636
}
3737
return <div />;
3838
}

web/renderer/react-types.d.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
/// <reference types="react-dom" />
33

44
// Global JSX namespace for React 19 compatibility
5-
import * as React from 'react';
5+
import * as React from "react";
66

77
declare global {
88
namespace JSX {
9-
interface Element extends React.ReactElement<any, any> { }
9+
interface Element extends React.ReactElement<any, any> {}
1010
interface ElementClass extends React.Component<any> {
1111
render(): React.ReactNode;
1212
}
13-
interface ElementAttributesProperty { props: {}; }
14-
interface ElementChildrenAttribute { children: {}; }
15-
interface IntrinsicAttributes extends React.Attributes { }
16-
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
13+
interface ElementAttributesProperty {
14+
props: {};
15+
}
16+
interface ElementChildrenAttribute {
17+
children: {};
18+
}
19+
interface IntrinsicAttributes extends React.Attributes {}
20+
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {}
1721
interface IntrinsicElements {
1822
[elemName: string]: any;
1923
}
2024
}
21-
}
25+
}

0 commit comments

Comments
 (0)