Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamods/splash-screen",
"version": "1.0.32",
"version": "1.0.33",
"description": "Splash Screen maintained by Dynamo Team@Autodesk",
"author": "Autodesk Inc.",
"license": "MIT",
Expand Down
11 changes: 6 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ class App extends React.Component {
};

setBackgroundImage() {
let backgroundImage = '#base64BackgroundImage';
if (!backgroundImage.includes('#'))
// eslint-disable-next-line no-import-assign
base64DynamoBackground = backgroundImage;
// Dynamo replaces this placeholder with the real image before loading the page.
// Keep the result on the instance: ES module imports are read-only, and assigning
// to the imported binding throws once the bundler emits getter-only exports.
const backgroundImage = '#base64BackgroundImage';
this.backgroundImage = backgroundImage.includes('#') ? base64DynamoBackground : backgroundImage;
}

componentDidMount() {
Expand Down Expand Up @@ -87,7 +88,7 @@ class App extends React.Component {
</Col>
<Col className='p-0' >
{this.state.loadingDone && <span onClick={this.closeDynamo} className='close' />}
<img className='screenBackground' alt='' src={base64DynamoBackground}></img>
<img className='screenBackground' alt='' src={this.backgroundImage}></img>
</Col>
</Row>
<Toast />
Expand Down
Loading