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
1 changed files with 2 additions and 1 deletions

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)
}