Skip to content

Commit 8e16744

Browse files
committed
Allow for different default locale
1 parent d60b8c8 commit 8e16744

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

build/index.html

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<link rel="stylesheet" href="/src.e31bb0bc.css"></head>
6-
<body>
7-
<div id="root"></div>
8-
<script type="text/javascript" src="/src.e31bb0bc.js"></script>
9-
</body>
10-
</html>
1+
<!DOCTYPE html><html><head><meta charset="utf-8"><link rel="stylesheet" href="src.e31bb0bc.css"></head><body> <div id="root"></div> <script type="text/javascript" src="src.e31bb0bc.js"></script> </body></html>

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Asset extends React.Component {
3838

3939
render() {
4040
if (this.state.asset) {
41-
return <img src={this.state.asset.fields.file['en-US'].url + '?w=750'} />
41+
return <img src={this.state.asset.fields.file[this.props.sdk.locales.default].url + '?w=750'} />
4242
}
4343

4444
return <SkeletonContainer><SkeletonImage width={750} height={100} /></SkeletonContainer>
@@ -87,7 +87,7 @@ export class DialogExtension extends React.Component {
8787
return (
8888
<Typography className={styles.dialog}>{
8989
documentToReactComponents(
90-
this.state.entry.fields.helpText['en-US'],
90+
this.state.entry.fields.helpText[this.props.sdk.locales.default],
9191
{
9292
renderNode: {
9393
[BLOCKS.PARAGRAPH]: (node, children) => <Paragraph>{children}</Paragraph>,

0 commit comments

Comments
 (0)