File tree 4 files changed +617
-8956
lines changed
4 files changed +617
-8956
lines changed Original file line number Diff line number Diff line change 1
1
<div>
2
2
<p style="display:inline-block;color: red; font-weight: bold;">The new version of npm-gui is out now! Start it with:</p>
3
3
4
- <pre style="display:inline-block; vertical-align: middle; color: white;">npx npm-gui@latest</pre> <span style="color: white;">Check it out!</span>
4
+ <pre style="display:inline-block; vertical-align: middle; color: white;">npx npm-gui@latest</pre>
5
+
6
+ <span style="color: white;">Check it out!</span>
7
+
8
+ <a href="https://npm-gui.nullapps.dev" style="colow:white; font-weight: bold;">Go to Documentation</a>
5
9
6
- <a href="https://npm-gui.nullapps.dev">Go to Documentation</a>
7
10
</div>
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persist
6
6
import { QueryClient , QueryClientProvider } from '@tanstack/react-query' ;
7
7
import { persistQueryClient } from '@tanstack/react-query-persist-client' ;
8
8
import React from 'react' ;
9
- import { render } from 'react-dom' ;
9
+ import { createRoot } from 'react-dom/client ' ;
10
10
11
11
import { App } from './components/App' ;
12
12
@@ -35,14 +35,19 @@ persistQueryClient({
35
35
} ,
36
36
} ) ;
37
37
38
- render (
39
- < React . StrictMode >
40
- < QueryClientProvider client = { queryClient } >
41
- < App />
42
- </ QueryClientProvider >
43
- </ React . StrictMode > ,
44
- document . querySelector ( '.npm-gui' ) ,
45
- ) ;
38
+ const container = document . querySelector ( '.npm-gui' ) ;
39
+
40
+ if ( container ) {
41
+ const root = createRoot ( container ) ;
42
+
43
+ root . render (
44
+ < React . StrictMode >
45
+ < QueryClientProvider client = { queryClient } >
46
+ < App />
47
+ </ QueryClientProvider >
48
+ </ React . StrictMode > ,
49
+ ) ;
50
+ }
46
51
47
52
if ( window . localStorage . getItem ( 'npm-gui-id' ) === null ) {
48
53
window . localStorage . setItem ( 'npm-gui-id' , Date . now ( ) . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments