Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d786f0

Browse files
committed
Go through a pass
1 parentf0f13a6 commit5d786f0

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

‎final/client/src/index.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ function IsLoggedIn() {
4949
returndata.isLoggedIn ?<Pages/> :<Login/>;
5050
}
5151

52-
constroot=ReactDOM.createRoot(document.getElementById('root')!);
52+
// Find our rootElement or throw and error if it doesn't exist
53+
constrootElement=document.getElementById('root');
54+
if(!rootElement)thrownewError('Failed to find the root element');
55+
constroot=ReactDOM.createRoot(rootElement);
5356

5457
injectStyles();
5558

59+
// Pass the ApolloClient instance to the ApolloProvider component
5660
root.render(
5761
<ApolloProviderclient={client}>
5862
<IsLoggedIn/>

‎start/client/src/index.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ import injectStyles from './styles';
1010

1111
injectStyles();
1212

13-
// Pass the ApolloClient instance to the ApolloProvider component
13+
// Find our rootElement or throw and error if it doesn't exist
14+
constrootElement=document.getElementById('root');
15+
if(!rootElement)thrownewError('Failed to find the root element');
16+
constroot=ReactDOM.createRoot(rootElement);
1417

15-
constroot=ReactDOM.createRoot(document.getElementById("root")!);
18+
// Pass the ApolloClient instance to the ApolloProvider component;
1619
root.render(
1720
<ApolloProviderclient={client}>
1821
<Pages/>
1922
</ApolloProvider>,
20-
);
23+
);

‎start/client/src/pages/launches.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importReact,{}from'react';
1+
importReactfrom'react';
22
import{gql}from'@apollo/client'
33

44
exportconstLAUNCH_TILE_DATA=gql`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp