Skip to content

Commit dad0689

Browse files
author
Krit
committed
fix some error on history.push()
1 parent 6b04790 commit dad0689

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/components/Sidebar/AppsMenu.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let AppsMenu = ({ apps, current, height, onSelect }) => (
2323
return null;
2424
}
2525
return (
26-
<Link to={html`/apps/${app.slug}/browser`} key={app.slug} className={styles.menuRow}>
26+
<Link to={{ pathname: html`/apps/${app.slug}/browser` }} key={app.slug} className={styles.menuRow}>
2727
{app.name}
2828
<AppBadge production={app.production} />
2929
</Link>

src/components/Sidebar/AppsSelector.react.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class AppsSelector extends React.Component {
5959
if (sections[0] === '') {
6060
sections.shift();
6161
}
62-
history.push(null, `/apps/${value}/${sections[2]}`);
62+
history.push(`/apps/${value}/${sections[2]}`);
6363
}
6464
});
6565
}
@@ -100,4 +100,3 @@ export default class AppsSelector extends React.Component {
100100
AppsSelector.contextTypes = {
101101
currentApp: React.PropTypes.instanceOf(ParseApp)
102102
};
103-

src/dashboard/Push/PushNew.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ export default class PushNew extends DashboardView {
663663
<Fieldset
664664
legend='Preview'
665665
description='Double check that everything looks good!'>
666-
<PushPreview push={fields} audiences={this.props.pushaudiences} />
666+
<PushPreview pushState={fields} audiences={this.props.pushaudiences} />
667667
</Fieldset>
668668

669669
<Toolbar section='Push' subsection='Send a new campaign' />

src/dashboard/Settings/GeneralSettings.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ let ManageAppFields = ({
228228
description='View your migration progress.' />}
229229
input={<FormButton
230230
color='blue'
231-
onClick={() => history.push('/apps/' + appSlug + '/migration')}
231+
onClick={() => history.push(`/apps/${appSlug}/migration`)}
232232
value='View progress' />} />
233233
} else {
234234
migrateAppField = [<Field
@@ -427,7 +427,7 @@ export default class GeneralSettings extends DashboardView {
427427
return promise;
428428
}}
429429
onClose={closeModalWithConnectionString}
430-
onSuccess={() => history.push('/apps/' + this.context.currentApp.slug + '/migration')}
430+
onSuccess={() => history.push(`/apps/${this.context.currentApp.slug}/migration`)}
431431
clearFields={() => this.setState({
432432
migrationMongoURL: '',
433433
migrationWarnings: [],

0 commit comments

Comments
 (0)