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:
Vinod Paidimarry
2024-02-22 20:17:11 -08:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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)
}