Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit faaa265

Browse files
committed
entry previews easier text selection
1 parent b103e1d commit faaa265

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/views/Database.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ function ProgramView () {
3535
const [loading, setLoading] = React.useState(false)
3636
const [address] = React.useState(`/orbitdb/${programName}/${dbName}`)
3737

38-
const handleSelect = (entry) => {
39-
setEntry(entry)
38+
const handleSelect = (e) => {
39+
setEntry(e !== entry ? e : null)
4040
}
4141

4242
const handleBack = () => {
@@ -155,7 +155,6 @@ function ProgramView () {
155155
marginY={majorScale(1)}
156156
paddingY={majorScale(1)}
157157
backgroundColor='#FEF8E7'
158-
onClick={() => handleSelect(null)}
159158
>{JSON.stringify(e, null, 2)}</Pre>
160159
: ''}
161160
</Pane>

0 commit comments

Comments
 (0)