From f3569a547314e9bd87f95150cc76f930247bbe56 Mon Sep 17 00:00:00 2001 From: Mickael KERJEAN Date: Thu, 7 Mar 2019 15:58:41 +1100 Subject: [PATCH] fix (navigation): prevent file navigation to unknown state --- client/pages/filespage/thing-existing.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/pages/filespage/thing-existing.js b/client/pages/filespage/thing-existing.js index cbca4412..b98abcda 100644 --- a/client/pages/filespage/thing-existing.js +++ b/client/pages/filespage/thing-existing.js @@ -214,7 +214,7 @@ export class ExistingThing extends React.Component { return connectDragSource(connectDropNativeFile(connectDropFile(
- + - +
))); } @@ -244,6 +244,11 @@ ExistingThing.PropTypes = { nativeFileIsOver: PropTypes.bool.isRequired, canDropFile: PropTypes.bool.isRequired, canDropNativeFile: PropTypes.bool.isRequired +}; + +export default function ToggleableLink(props) { + const { disabled, ...rest } = props; + return disabled ? props.children : {props.children}; } class Filename extends React.Component {