Skip to content

Commit

Permalink
Remove StrictMode Wrapper (#339)
Browse files Browse the repository at this point in the history
* Remove StrictMode Wrapper

* Update env Template

* ReAdd Offline Access

* Rush Change
  • Loading branch information
MichaelSwigerAtBentley authored Nov 18, 2024
1 parent c3d72e4 commit ec60287
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/cra-template-web-viewer",
"comment": "Remove React.StrictMode Wrapper",
"type": "patch"
}
],
"packageName": "@itwin/cra-template-web-viewer"
}
2 changes: 1 addition & 1 deletion packages/apps/desktop-viewer-test/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Configuration ----
ITWIN_VIEWER_SCOPE ="imodelaccess:read offline_access imodels:read realitydata:read itwins:read"
ITWIN_VIEWER_SCOPE ="itwin-platform offline_access"
ITWIN_VIEWER_CLIENT_ID=""
ITWIN_VIEWER_REDIRECT_URI=""
ITWIN_VIEWER_ISSUER_URL="https://ims.bentley.com"
Expand Down
6 changes: 1 addition & 5 deletions packages/apps/desktop-viewer-test/src/frontend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ const viewerFrontendMain = async () => {

document.documentElement.classList.add(`iui-theme-dark`);

root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
root.render(<App />);
};

viewerFrontendMain(); // eslint-disable-line @typescript-eslint/no-floating-promises
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ const redirectUrl = new URL(process.env.IMJS_AUTH_CLIENT_REDIRECT_URI);
if (redirectUrl.pathname === window.location.pathname) {
Auth.handleSigninCallback().catch(console.error);
} else {
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
root.render(<App />);
}

// If you want your app to work offline and load faster, you can change
Expand Down

0 comments on commit ec60287

Please sign in to comment.