Skip to content

fix some error on history.push() #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2016
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
2 changes: 1 addition & 1 deletion src/components/Sidebar/AppsMenu.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let AppsMenu = ({ apps, current, height, onSelect }) => (
return null;
}
return (
<Link to={html`/apps/${app.slug}/browser`} key={app.slug} className={styles.menuRow}>
<Link to={{ pathname: html`/apps/${app.slug}/browser` }} key={app.slug} className={styles.menuRow}>
{app.name}
<AppBadge production={app.production} />
</Link>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Sidebar/AppsSelector.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class AppsSelector extends React.Component {
if (sections[0] === '') {
sections.shift();
}
history.push(null, `/apps/${value}/${sections[2]}`);
history.push(`/apps/${value}/${sections[2]}`);
}
});
}
Expand Down Expand Up @@ -100,4 +100,3 @@ export default class AppsSelector extends React.Component {
AppsSelector.contextTypes = {
currentApp: React.PropTypes.instanceOf(ParseApp)
};

2 changes: 1 addition & 1 deletion src/dashboard/Push/PushNew.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ export default class PushNew extends DashboardView {
<Fieldset
legend='Preview'
description='Double check that everything looks good!'>
<PushPreview push={fields} audiences={this.props.pushaudiences} />
<PushPreview pushState={fields} audiences={this.props.pushaudiences} />
</Fieldset>

<Toolbar section='Push' subsection='Send a new campaign' />
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard/Settings/GeneralSettings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ let ManageAppFields = ({
description='View your migration progress.' />}
input={<FormButton
color='blue'
onClick={() => history.push('/apps/' + appSlug + '/migration')}
onClick={() => history.push(`/apps/${appSlug}/migration`)}
value='View progress' />} />
} else {
migrateAppField = [<Field
Expand Down Expand Up @@ -427,7 +427,7 @@ export default class GeneralSettings extends DashboardView {
return promise;
}}
onClose={closeModalWithConnectionString}
onSuccess={() => history.push('/apps/' + this.context.currentApp.slug + '/migration')}
onSuccess={() => history.push(`/apps/${this.context.currentApp.slug}/migration`)}
clearFields={() => this.setState({
migrationMongoURL: '',
migrationWarnings: [],
Expand Down