UX Changes: persist user display choice in localStorage

This commit is contained in:
vinodkiran
2023-11-20 18:19:25 +05:30
parent de7f343f90
commit c7bf75e259
+2 -1
View File
@@ -43,9 +43,10 @@ const Chatflows = () => {
const [loginDialogProps, setLoginDialogProps] = useState({})
const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)
const [view, setView] = React.useState('card')
const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card')
const handleChange = (event, nextView) => {
localStorage.setItem('flowDisplayStyle', nextView)
setView(nextView)
}