Merge pull request #1799 from vinodkiran/BUGFIX/dashboard-view-toggle
Bugfix: View Toggle loses state when button is clicked twice.
This commit is contained in:
commit
39f6991b0f
|
|
@ -47,6 +47,7 @@ const Chatflows = () => {
|
|||
const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card')
|
||||
|
||||
const handleChange = (event, nextView) => {
|
||||
if (nextView === null) return
|
||||
localStorage.setItem('flowDisplayStyle', nextView)
|
||||
setView(nextView)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ const Marketplace = () => {
|
|||
}
|
||||
|
||||
const handleViewChange = (event, nextView) => {
|
||||
if (nextView === null) return
|
||||
localStorage.setItem('mpDisplayStyle', nextView)
|
||||
setView(nextView)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue