Skip to content

Commit

Permalink
Comment out edit functionality. Edit mode alway ON now
Browse files Browse the repository at this point in the history
  • Loading branch information
ottodevs committed Jun 6, 2019
1 parent a5c6cd2 commit a681a52
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import Widget from './components/content/Widget'

function App() {
const [panelVisible, setPanelVisible] = useState(false)
const [editMode, setEditMode] = useState(false)
// TODO: useState(false) to start editMode disabled
const [editMode, setEditMode] = useState(true)
const [selectedWidget, setSelectedWidget] = useState(0)

const { api, appState } = useAragonApi()
Expand Down Expand Up @@ -70,31 +71,32 @@ function App() {
appBar={
<AppBar
title="Home"
endContent={
<div>
{editMode && (
<div>
<Button
mode="outline"
onClick={toggleEditMode}
style={{ marginRight: 20 }}
>
Cancel and Exit
</Button>

<Button mode="strong" onClick={toggleEditMode}>
Submit changes
</Button>
</div>
)}

{!editMode && (
<Button mode="strong" onClick={toggleEditMode}>
Edit Page
</Button>
)}
</div>
}
// TODO: uncomment this block for edit functionality
// endContent={
// <div>
// {editMode && (
// <div>
// <Button
// mode="outline"
// onClick={toggleEditMode}
// style={{ marginRight: 20 }}
// >
// Cancel and Exit
// </Button>

// <Button mode="strong" onClick={toggleEditMode}>
// Submit changes
// </Button>
// </div>
// )}

// {!editMode && (
// <Button mode="strong" onClick={toggleEditMode}>
// Edit Page
// </Button>
// )}
// </div>
// }
/>
}
>
Expand Down

0 comments on commit a681a52

Please sign in to comment.