Fix clicking stream ids copying when no empty space

This commit is contained in:
Max Goodhart
2020-07-06 17:49:40 -07:00
parent b229930aa1
commit 5b1899901a

View File

@@ -282,6 +282,7 @@ function App({ wsEndpoint }) {
const handleClickId = useCallback(
(streamId) => {
navigator.clipboard.writeText(streamId)
const availableIdx = range(gridCount * gridCount).find(
(i) => !sharedState.views[i].streamId,
)
@@ -289,7 +290,6 @@ function App({ wsEndpoint }) {
return
}
handleSetView(availableIdx, streamId)
navigator.clipboard.writeText(streamId)
},
[gridCount, sharedState],
)