Skip to content

Commit

Permalink
feat: only allow saving spaces that have been marked as offline
Browse files Browse the repository at this point in the history
closes #67
  • Loading branch information
juancarlosfarah committed May 4, 2019
1 parent 16d6bec commit 715bab5
Show file tree
Hide file tree
Showing 2 changed files with 842 additions and 1,443 deletions.
5 changes: 3 additions & 2 deletions src/components/space/SpaceHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class SpaceHeader extends Component {
PropTypes.shape({
id: PropTypes.string.isRequired,
saved: PropTypes.bool,
offline: PropTypes.bool,
})
).isRequired,
space: PropTypes.shape({
Expand Down Expand Up @@ -55,8 +56,8 @@ class SpaceHeader extends Component {

renderSaveButton() {
const { space, classes } = this.props;
const { saved } = space;
if (!saved) {
const { saved, offlineSupport } = space;
if (!saved && offlineSupport) {
return (
<IconButton
className={classes.button}
Expand Down
Loading

0 comments on commit 715bab5

Please sign in to comment.