Skip to content

Commit e76a5db

Browse files
committed
website: uppgrade to react 18
1 parent 5b71d52 commit e76a5db

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

website/App.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const App: React.FC = () => {
2121
<Markdown
2222
style={{ paddingTop: 25, maxWidth: 680, margin: '0 auto' }}
2323
source={MDStr.replace(/([\s\S]*)<!--dividing-->/, '')}
24+
wrapperElement={{
25+
"data-color-mode": "light"
26+
}}
2427
/>
2528
</div>
2629
);

website/index.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
1+
import { createRoot } from 'react-dom/client';
32
import App from './App';
43

5-
ReactDOM.render(<App />, document.getElementById('root'));
4+
const container = document.getElementById('root');
5+
const root = createRoot(container!);
6+
root.render(<App />);

0 commit comments

Comments
 (0)