mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-23 15:00:29 +03:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user