1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 00:28:00 +02:00

fix bug in FileDragAndDropDialog

This commit is contained in:
Tim Daubenschütz 2015-10-09 14:22:48 +02:00
parent ddf3eb18fc
commit cee8d7cae7
2 changed files with 5 additions and 5 deletions

View File

@ -47,13 +47,13 @@ export default function RedirectProxyHandler({to, when}) {
this.state.currentUser && this.state.currentUser.email :
this.state.currentUser && !this.state.currentUser.email;
if(!exprToValidate && when === 'loggedIn' && redirect) {
if(exprToValidate) {
window.setTimeout(() => this.history.pushState(null, to, query));
} else if(!exprToValidate && when === 'loggedIn' && redirect) {
delete query.redirect;
window.setTimeout(() => this.history.pushState(null, '/' + redirect, query));
} else if(exprToValidate) {
window.setTimeout(() => this.history.pushState(null, to, query));
} else if(!exprToValidate && when === 'loggedOut' && redirectAuthenticated) {
/*
* redirectAuthenticated contains an arbirary path

View File

@ -43,7 +43,7 @@ let FileDragAndDropDialog = React.createClass({
<div className="file-drag-and-drop-dialog present-options">
<p>{getLangText('Would you rather')}</p>
<Link
to={location.pathname + location.query}
to={location.pathname}
query={queryParamsHash}>
<span className="btn btn-default btn-sm">
{getLangText('Hash your work')}
@ -53,7 +53,7 @@ let FileDragAndDropDialog = React.createClass({
<span> or </span>
<Link
to={location.pathname + location.query}
to={location.pathname}
query={queryParamsUpload}>
<span className="btn btn-default btn-sm">
{getLangText('Upload and hash your work')}