mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
UX Changes: persist user display choice in localStorage
This commit is contained in:
@@ -43,9 +43,10 @@ const Chatflows = () => {
|
|||||||
const [loginDialogProps, setLoginDialogProps] = useState({})
|
const [loginDialogProps, setLoginDialogProps] = useState({})
|
||||||
|
|
||||||
const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)
|
const getAllChatflowsApi = useApi(chatflowsApi.getAllChatflows)
|
||||||
const [view, setView] = React.useState('card')
|
const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card')
|
||||||
|
|
||||||
const handleChange = (event, nextView) => {
|
const handleChange = (event, nextView) => {
|
||||||
|
localStorage.setItem('flowDisplayStyle', nextView)
|
||||||
setView(nextView)
|
setView(nextView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user